aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/public/purecalc/common/transformations/utils.cpp
diff options
context:
space:
mode:
authorimunkin <imunkin@yandex-team.com>2025-01-17 16:12:38 +0300
committerimunkin <imunkin@yandex-team.com>2025-01-17 16:29:14 +0300
commit5bf3fd8cf1463c43723f1c8ba9d2322073f93c04 (patch)
tree89f3800c888c589798de9e4f5a34384eda2f6808 /yql/essentials/public/purecalc/common/transformations/utils.cpp
parente2b9ea56b89acb80b934fcfa26a782bb92e1d39e (diff)
downloadydb-5bf3fd8cf1463c43723f1c8ba9d2322073f93c04.tar.gz
YQL-19424: Use WideStream instead of WideFlow in WideFromBlocks computation node
commit_hash:21c84a9004cc57883d949b8fc637fc3ae7bfbda9
Diffstat (limited to 'yql/essentials/public/purecalc/common/transformations/utils.cpp')
-rw-r--r--yql/essentials/public/purecalc/common/transformations/utils.cpp55
1 files changed, 25 insertions, 30 deletions
diff --git a/yql/essentials/public/purecalc/common/transformations/utils.cpp b/yql/essentials/public/purecalc/common/transformations/utils.cpp
index 6f63be0208..8c5192da26 100644
--- a/yql/essentials/public/purecalc/common/transformations/utils.cpp
+++ b/yql/essentials/public/purecalc/common/transformations/utils.cpp
@@ -13,41 +13,36 @@ TExprNode::TPtr NYql::NPureCalc::NodeFromBlocks(
) {
const auto items = structType->GetItems();
Y_ENSURE(items.size() > 0);
-
- // 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);
-
return ctx.Builder(pos)
.Lambda()
.Param("stream")
.Callable(0, "FromFlow")
.Callable(0, "NarrowMap")
- .Callable(0, "WideFromBlocks")
- .Callable(0, "ExpandMap")
- .Callable(0, "ToFlow")
- .Arg(0, "stream")
- .Seal()
- .Lambda(1)
- .Param("item")
- .Do([&](TExprNodeBuilder& lambda) -> TExprNodeBuilder& {
- ui32 i = 0;
- for (const auto& item : items) {
- lambda.Callable(i++, "Member")
- .Arg(0, "item")
- .Atom(1, item->GetName())
- .Seal();
- }
- lambda.Callable(i, "Member")
- .Arg(0, "item")
- .Atom(1, PurecalcBlockColumnLength)
- .Seal();
- return lambda;
- })
+ .Callable(0, "ToFlow")
+ .Callable(0, "WideFromBlocks")
+ .Callable(0, "FromFlow")
+ .Callable(0, "ExpandMap")
+ .Callable(0, "ToFlow")
+ .Arg(0, "stream")
+ .Seal()
+ .Lambda(1)
+ .Param("item")
+ .Do([&](TExprNodeBuilder& lambda) -> TExprNodeBuilder& {
+ ui32 i = 0;
+ for (const auto& item : items) {
+ lambda.Callable(i++, "Member")
+ .Arg(0, "item")
+ .Atom(1, item->GetName())
+ .Seal();
+ }
+ lambda.Callable(i, "Member")
+ .Arg(0, "item")
+ .Atom(1, PurecalcBlockColumnLength)
+ .Seal();
+ return lambda;
+ })
+ .Seal()
+ .Seal()
.Seal()
.Seal()
.Seal()