Skip to content

Commit

Permalink
Fix agg namings in serialize lambda
Browse files Browse the repository at this point in the history
  • Loading branch information
Darych committed Aug 29, 2024
1 parent 032d9a9 commit b1d844d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ydb/library/yql/core/yql_aggregate_expander.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1506,7 +1506,7 @@ TExprNode::TPtr TAggregateExpander::BuildFinalizeByKeyLambda(const TExprNode::TP
.Seal()
.Seal()
.Build();
if (AllowSpilling && !FinalColumnNames.empty()) {
if (AllowSpilling) {
auto saveLambda = Ctx.Builder(Node->Pos())
.Lambda()
.Param("key")
Expand Down Expand Up @@ -2535,7 +2535,8 @@ TExprNode::TPtr TAggregateExpander::GeneratePostAggregateSerializePhase() {
pickleType = KeyColumns->ChildrenSize() > 1 ? Ctx.MakeType<TTupleExprType>(keyItemTypes) : keyItemTypes[0];
pickleTypeNode = ExpandType(Node->Pos(), *pickleType, Ctx);
}
auto columnNames = FinalColumnNames;
bool aggregateOnly = (Suffix != "");
const auto& columnNames = aggregateOnly ? FinalColumnNames : InitialColumnNames;
return Ctx.Builder(Node->Pos())
.Lambda()
.Param("key")
Expand Down

0 comments on commit b1d844d

Please sign in to comment.