Skip to content

Commit 2d1d274

Browse files
committed
YQL-19424: Fix CanRewriteToBlocksWithInput heuristics for EBlockEngineMode::Auto
Follows up 21c84a9004cc57883d949b8fc637fc3ae7bfbda9 commit_hash:6aa211011a958bb230fe5c97cc4678d0bfb283ad
1 parent 589b3cc commit 2d1d274

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

yql/essentials/core/peephole_opt/yql_opt_peephole_physical.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6362,7 +6362,15 @@ bool CanRewriteToBlocksWithInput(const TExprNode& input, const TTypeAnnotationCo
63626362
case NYql::EBlockEngineMode::Disable:
63636363
return false;
63646364
case NYql::EBlockEngineMode::Auto:
6365-
return input.IsCallable("WideFromBlocks");
6365+
// The code below matches, whether the input is one of
6366+
// the following:
6367+
// * (WideFromBlocks (...))
6368+
// * (ToFlow (WideFromBlocks (...)))
6369+
// FIXME: The latter option can be removed when
6370+
// WideStream overloads are implemented for all nodes,
6371+
// using this helper.
6372+
return input.IsCallable("WideFromBlocks") ||
6373+
input.IsCallable("ToFlow") && input.Head().IsCallable("WideFromBlocks");
63666374
case NYql::EBlockEngineMode::Force:
63676375
return true;
63686376
}

0 commit comments

Comments
 (0)