Skip to content

Commit acd9bd5

Browse files
igormunkinblinkov
authored andcommitted
Make DQ use only WideStream for WideToBlocks (#14499)
1 parent d4738ff commit acd9bd5

File tree

3 files changed

+3
-58
lines changed

3 files changed

+3
-58
lines changed

ydb/library/yql/dq/opt/dq_opt_build.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -789,21 +789,6 @@ bool CanRebuildForWideBlockChannelOutput(bool forceBlocks, const TDqOutput& outp
789789

790790
TDqPhyStage RebuildStageOutputAsWideBlock(const TDqPhyStage& stage, TExprContext& ctx)
791791
{
792-
if constexpr (!NYql::NBlockStreamIO::WideToBlocks) {
793-
return Build<TDqPhyStage>(ctx, stage.Pos())
794-
.InitFrom(stage)
795-
.Program()
796-
.Args(stage.Program().Args())
797-
.Body<TCoFromFlow>()
798-
.Input<TCoWideToBlocks>()
799-
.Input<TCoToFlow>()
800-
.Input(stage.Program().Body())
801-
.Build()
802-
.Build()
803-
.Build()
804-
.Build()
805-
.Done();
806-
}
807792
return Build<TDqPhyStage>(ctx, stage.Pos())
808793
.InitFrom(stage)
809794
.Program()

ydb/library/yql/dq/opt/dq_opt_peephole.cpp

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -797,39 +797,6 @@ NNodes::TExprBase DqPeepholeRewriteLength(const NNodes::TExprBase& node, TExprCo
797797

798798
auto dqPhyLength = node.Cast<TDqPhyLength>();
799799
if (typesCtx.IsBlockEngineEnabled()) {
800-
if constexpr (!NYql::NBlockStreamIO::WideToBlocks) {
801-
return NNodes::TExprBase(ctx.Builder(node.Pos())
802-
.Callable("NarrowMap")
803-
.Callable(0, "ToFlow")
804-
.Callable(0, "BlockCombineAll")
805-
.Callable(0, "FromFlow")
806-
.Callable(0, "WideToBlocks")
807-
.Add(0, MakeExpandMap(node.Pos(), {}, dqPhyLength.Input().Ptr(), ctx))
808-
.Seal()
809-
.Seal()
810-
.Callable(1, "Void")
811-
.Seal()
812-
.List(2)
813-
.List(0)
814-
.Callable(0, "AggBlockApply")
815-
.Atom(0, "count_all")
816-
.Seal()
817-
.Seal()
818-
.Seal()
819-
.Seal()
820-
.Seal()
821-
.Lambda(1)
822-
.Param("value")
823-
.Callable("AsStruct")
824-
.List(0)
825-
.Atom(0, dqPhyLength.Name())
826-
.Arg(1, "value")
827-
.Seal()
828-
.Seal()
829-
.Seal()
830-
.Seal()
831-
.Build());
832-
}
833800
return NNodes::TExprBase(ctx.Builder(node.Pos())
834801
.Callable("NarrowMap")
835802
.Callable(0, "ToFlow")

ydb/library/yql/providers/dq/provider/exec/yql_dq_exectransformer.cpp

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -335,16 +335,9 @@ TExprNode::TPtr DqMarkBlockStage(const TDqStatePtr& state, const TPublicIds::TPt
335335
return false;
336336
}
337337

338-
if constexpr (!NYql::NBlockStreamIO::WideToBlocks) {
339-
if (node->IsCallable("WideToBlocks") && node->Head().IsCallable("ToFlow") && node->Head().Head().IsArgument()) {
340-
// scalar channel as input
341-
return false;
342-
}
343-
} else {
344-
if (node->IsCallable("WideToBlocks") && node->Head().IsArgument()) {
345-
// scalar channel as input
346-
return false;
347-
}
338+
if (node->IsCallable("WideToBlocks") && node->Head().IsArgument()) {
339+
// scalar channel as input
340+
return false;
348341
}
349342

350343
const TTypeAnnotationNode* nodeType = node->GetTypeAnn();

0 commit comments

Comments
 (0)