diff options
author | imunkin <imunkin@yandex-team.com> | 2024-12-16 15:35:49 +0300 |
---|---|---|
committer | imunkin <imunkin@yandex-team.com> | 2024-12-16 16:13:12 +0300 |
commit | 88e0ad5922cea1349ec1f8cbf133524cf865d696 (patch) | |
tree | 4a186e18f5b5cfd70eb92e0123724095ee8f520f /yql/essentials/core/yql_aggregate_expander.cpp | |
parent | 05a59c8fb1147ca56cd24c4bb9114d45fd31dd96 (diff) | |
download | ydb-88e0ad5922cea1349ec1f8cbf133524cf865d696.tar.gz |
Introduce a flag to control type annotation for WideFromBlocks
commit_hash:e0e84d14ea42f099c639f993508e18f7df307bb4
Diffstat (limited to 'yql/essentials/core/yql_aggregate_expander.cpp')
-rw-r--r-- | yql/essentials/core/yql_aggregate_expander.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/yql/essentials/core/yql_aggregate_expander.cpp b/yql/essentials/core/yql_aggregate_expander.cpp index 4e81c16d0e..a9b5a16162 100644 --- a/yql/essentials/core/yql_aggregate_expander.cpp +++ b/yql/essentials/core/yql_aggregate_expander.cpp @@ -708,6 +708,15 @@ TExprNode::TPtr TAggregateExpander::TryGenerateBlockCombineAllOrHashed() { TExprNode::TPtr aggWideFlow; if (hashed) { + + // Static assert to ensure backward compatible change: if the + // constant below is true, both input and output types of + // WideFromBlocks callable have to be WideStream; otherwise, + // both input and output types have to be WideFlow. + // FIXME: When all spots using WideFromBlocks are adjusted + // to work with WideStream, drop the assertion below. + static_assert(!NYql::NBlockStreamIO::WideFromBlocks); + aggWideFlow = Ctx.Builder(Node->Pos()) .Callable("WideFromBlocks") .Callable(0, "ToFlow") @@ -2930,6 +2939,14 @@ TExprNode::TPtr TAggregateExpander::TryGenerateBlockMergeFinalizeHashed() { .Build(); } + // Static assert to ensure backward compatible change: if the + // constant below is true, both input and output types of + // WideFromBlocks callable have to be WideStream; otherwise, + // both input and output types have to be WideFlow. + // FIXME: When all spots using WideFromBlocks are adjusted + // to work with WideStream, drop the assertion below. + static_assert(!NYql::NBlockStreamIO::WideFromBlocks); + auto aggWideFlow = Ctx.NewCallable(Node->Pos(), "WideFromBlocks", { aggBlocks }); auto finalFlow = MakeNarrowMap(Node->Pos(), outputColumns, aggWideFlow, Ctx); auto root = Ctx.NewCallable(Node->Pos(), "FromFlow", { finalFlow }); |