Skip to content

Commit

Permalink
Fix build due to ClickHouse/ClickHouse#71095
Browse files Browse the repository at this point in the history
  • Loading branch information
baibaichen committed Dec 13, 2024
1 parent 9c9fdff commit 4fc4a21
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cpp-ch/local-engine/Storages/MergeTree/SparkMergeTreeMeta.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,14 @@ doBuildMetadata(const DB::NamesAndTypesList & columns, const ContextPtr & contex
setSecondaryIndex(columns, context, table, metadata);

metadata->partition_key.expression_list_ast = std::make_shared<ASTExpressionList>();
metadata->sorting_key = KeyDescription::parse(table.order_by_key, metadata->getColumns(), context);
metadata->sorting_key = KeyDescription::parse(table.order_by_key, metadata->getColumns(), context, true);
if (table.primary_key.empty())
if (table.order_by_key != MergeTreeTable::TUPLE)
metadata->primary_key = KeyDescription::parse(table.order_by_key, metadata->getColumns(), context);
metadata->primary_key = KeyDescription::parse(table.order_by_key, metadata->getColumns(), context, true);
else
metadata->primary_key.expression = std::make_shared<ExpressionActions>(ActionsDAG{});
else
metadata->primary_key = KeyDescription::parse(table.primary_key, metadata->getColumns(), context);
metadata->primary_key = KeyDescription::parse(table.primary_key, metadata->getColumns(), context, true);
return metadata;
}

Expand Down

0 comments on commit 4fc4a21

Please sign in to comment.