diff options
| author | vvvv <[email protected]> | 2025-04-17 20:30:53 +0300 |
|---|---|---|
| committer | vvvv <[email protected]> | 2025-04-17 20:45:47 +0300 |
| commit | 0a8e48ae59cc09eb277be603227998ee075b80b4 (patch) | |
| tree | 6b1f4582bd4893996f4538b14beb648bcb964fde /yql/essentials/sql/v1/select.cpp | |
| parent | 7d1f3b52f8aac55aac0df0556f91ce54e949d454 (diff) | |
YQL-19864 sql flag + test with explicit flag & by version
commit_hash:902cfa0c1b574c1addb5df96a4b38c792ae82258
Diffstat (limited to 'yql/essentials/sql/v1/select.cpp')
| -rw-r--r-- | yql/essentials/sql/v1/select.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/yql/essentials/sql/v1/select.cpp b/yql/essentials/sql/v1/select.cpp index c4290f3268f..cb72dc95f5f 100644 --- a/yql/essentials/sql/v1/select.cpp +++ b/yql/essentials/sql/v1/select.cpp @@ -1744,6 +1744,11 @@ public: if (Flatten) { block = L(block, Y("let", "core", Y(ordered ? "OrderedFlatMap" : "FlatMap", "core", BuildLambda(Pos, Y("row"), Flatten, "res")))); } + if (ctx.GroupByExprAfterWhere) { + if (auto filter = Source->BuildFilter(ctx, "core"); filter) { + block = L(block, Y("let", "core", filter)); + } + } if (PreaggregatedMap) { block = L(block, Y("let", "core", PreaggregatedMap)); if (Source->IsCompositeSource() && !Columns.QualifiedAll) { @@ -1752,9 +1757,10 @@ public: } else if (Source->IsCompositeSource() && !Columns.QualifiedAll) { block = L(block, Y("let", "origcore", "core")); } - auto filter = Source->BuildFilter(ctx, "core"); - if (filter) { - block = L(block, Y("let", "core", filter)); + if (!ctx.GroupByExprAfterWhere) { + if (auto filter = Source->BuildFilter(ctx, "core"); filter) { + block = L(block, Y("let", "core", filter)); + } } if (Aggregate) { block = L(block, Y("let", "core", Aggregate)); |
