summaryrefslogtreecommitdiffstats
path: root/yql/essentials/sql/v1/node.cpp
diff options
context:
space:
mode:
authorvitya-smirnov <[email protected]>2025-07-15 17:01:51 +0300
committervitya-smirnov <[email protected]>2025-07-15 17:19:51 +0300
commit64137fb0cbe9afe92dca8efc335ef9ff16b78926 (patch)
tree1f35ca0b330569f9725b3cfc2971a894b65b25f7 /yql/essentials/sql/v1/node.cpp
parent6fb5119e5d0aee18cf78fb28d7f71c9539cca6dc (diff)
YQL-20171: Fix aggregation joining key
There was a bug with a aggregation deduplication by a column at the translator. For a single column the system joining all aggregations using the generic key. The generic key was just a column name without source name what leads to collision when aggregating multiple different sources with same column names. This patch fixes the generic key by adding a data source name there. Also tests are added. commit_hash:1c0a9da512f68c58d2830e096de76b769b733cb2
Diffstat (limited to 'yql/essentials/sql/v1/node.cpp')
-rw-r--r--yql/essentials/sql/v1/node.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/yql/essentials/sql/v1/node.cpp b/yql/essentials/sql/v1/node.cpp
index 84395eb78cc..77acab8813d 100644
--- a/yql/essentials/sql/v1/node.cpp
+++ b/yql/essentials/sql/v1/node.cpp
@@ -1709,8 +1709,8 @@ void IAggregation::DoUpdateState() const {
State_.Set(ENodeState::OverWindowDistinct, AggMode_ == EAggregateMode::OverWindowDistinct);
}
-const TString* IAggregation::GetGenericKey() const {
- return nullptr;
+TMaybe<TString> IAggregation::GetGenericKey() const {
+ return Nothing();
}
void IAggregation::Join(IAggregation*) {