Skip to content

Commit

Permalink
Reintroduce compatibility with is_deleted on a syntax level
Browse files Browse the repository at this point in the history
  • Loading branch information
alexey-milovidov committed Dec 27, 2023
1 parent 745d9bb commit 64b4e1a
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 64b4e1a

Please sign in to comment.