Skip to content

Commit

Permalink
Merge pull request ClickHouse#58251 from ClickHouse/reintroduce-compa…
Browse files Browse the repository at this point in the history
…tibility-with-a-misfeature

Reintroduce compatibility with `is_deleted` on a syntax level
  • Loading branch information
alexey-milovidov committed Dec 28, 2023
2 parents 583b963 + 64b4e1a commit a811d5b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Storages/MergeTree/registerStorageMergeTree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,15 @@ static StoragePtr create(const StorageFactory::Arguments & args)
}
else if (merging_params.mode == MergeTreeData::MergingParams::Replacing)
{
/// Due to a misfortune, there could be an extra obsolete parameter.
/// We ignore it for backward compatibility.
if (arg_cnt - arg_num == 2 && !engine_args[arg_cnt - 1]->as<ASTLiteral>() && is_extended_storage_def)
{
if (!tryGetIdentifierName(engine_args[arg_cnt - 1]))
throw Exception(ErrorCodes::BAD_ARGUMENTS, "is_deleted column name must be an identifier {}", verbose_help_message);
--arg_cnt;
}

/// If the last element is not index_granularity or replica_name (a literal), then this is the name of the version column.
if (arg_cnt && !engine_args[arg_cnt - 1]->as<ASTLiteral>())
{
Expand Down

0 comments on commit a811d5b

Please sign in to comment.