@@ -25,7 +25,7 @@ TExprNode::TPtr TAggregateExpander::ExpandAggregate()
2525
2626 HaveDistinct = AnyOf (AggregatedColumns->ChildrenList (),
2727 [](const auto & child) { return child->ChildrenSize () == 3 ; });
28- EffectiveCompact = (HaveDistinct && CompactForDistinct && !TypesCtx.UseBlocks ) || ForceCompact || HasSetting (*settings, " compact" );
28+ EffectiveCompact = (HaveDistinct && CompactForDistinct && !TypesCtx.IsBlockEngineEnabled () ) || ForceCompact || HasSetting (*settings, " compact" );
2929 for (const auto & trait : Traits) {
3030 auto mergeLambda = trait->Child (5 );
3131 if (mergeLambda->Tail ().IsCallable (" Void" )) {
@@ -56,7 +56,7 @@ TExprNode::TPtr TAggregateExpander::ExpandAggregate()
5656 return GeneratePhases ();
5757 }
5858
59- if (TypesCtx.UseBlocks ) {
59+ if (TypesCtx.IsBlockEngineEnabled () ) {
6060 if (Suffix == " Combine" ) {
6161 auto ret = TryGenerateBlockCombine ();
6262 if (ret) {
@@ -2776,7 +2776,7 @@ TExprNode::TPtr TAggregateExpander::GeneratePhases() {
27762776 streams.push_back (SerializeIdxSet (indicies));
27772777 }
27782778
2779- if (TypesCtx.UseBlocks ) {
2779+ if (TypesCtx.IsBlockEngineEnabled () ) {
27802780 for (ui32 i = 0 ; i < unionAllInputs.size (); ++i) {
27812781 unionAllInputs[i] = Ctx.Builder (Node->Pos ())
27822782 .Callable (" Map" )
@@ -2797,7 +2797,7 @@ TExprNode::TPtr TAggregateExpander::GeneratePhases() {
27972797 }
27982798
27992799 auto settings = Node->ChildPtr (3 );
2800- if (TypesCtx.UseBlocks ) {
2800+ if (TypesCtx.IsBlockEngineEnabled () ) {
28012801 settings = AddSetting (*settings, Node->Pos (), " many_streams" , Ctx.NewList (Node->Pos (), std::move (streams)), Ctx);
28022802 }
28032803
@@ -2830,7 +2830,7 @@ TExprNode::TPtr TAggregateExpander::TryGenerateBlockCombine() {
28302830}
28312831
28322832TExprNode::TPtr TAggregateExpander::TryGenerateBlockMergeFinalize () {
2833- if (UsePartitionsByKeys || !TypesCtx.UseBlocks ) {
2833+ if (UsePartitionsByKeys || !TypesCtx.IsBlockEngineEnabled () ) {
28342834 return nullptr ;
28352835 }
28362836
@@ -2919,13 +2919,13 @@ TExprNode::TPtr TAggregateExpander::TryGenerateBlockMergeFinalizeHashed() {
29192919TExprNode::TPtr ExpandAggregatePeephole (const TExprNode::TPtr& node, TExprContext& ctx, TTypeAnnotationContext& typesCtx) {
29202920 if (NNodes::TCoAggregate::Match (node.Get ())) {
29212921 NNodes::TCoAggregate self (node);
2922- auto ret = TAggregateExpander::CountAggregateRewrite (self, ctx, typesCtx.UseBlocks );
2922+ auto ret = TAggregateExpander::CountAggregateRewrite (self, ctx, typesCtx.IsBlockEngineEnabled () );
29232923 if (ret != node) {
29242924 YQL_CLOG (DEBUG, Core) << " CountAggregateRewrite on peephole" ;
29252925 return ret;
29262926 }
29272927 }
2928- return ExpandAggregatePeepholeImpl (node, ctx, typesCtx, false , typesCtx.UseBlocks );
2928+ return ExpandAggregatePeepholeImpl (node, ctx, typesCtx, false , typesCtx.IsBlockEngineEnabled () );
29292929}
29302930
29312931} // namespace NYql
0 commit comments