Skip to content

Commit 7db2360

Browse files
Turned off hash propagation when shuffle elimination is off (#24725)
2 parents 3a0899e + d61be4d commit 7db2360

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

ydb/core/kqp/opt/kqp_opt_hash_func_propagate_transformer.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,13 +176,19 @@ class TKqpTxsHashFuncPropagateTransformer : public TSyncTransformerBase {
176176
.AddPostTypeAnnotation(/* forSubgraph */ true)
177177
.Add(CreateKqpTxHashFuncPropagateTransformer(config), "Peephole")
178178
.Build(false);
179+
ShuffleEliminationEnabled = config->OptShuffleElimination.Get().GetOrElse(config->DefaultEnableShuffleElimination);
179180
}
180181

181182
TStatus DoTransform(TExprNode::TPtr input, TExprNode::TPtr& output, TExprContext& ctx) final {
182183
if (!TKqpPhysicalQuery::Match(input.Get())) {
183184
return TStatus::Error;
184185
}
185186

187+
if (!ShuffleEliminationEnabled){
188+
output = input;
189+
return TStatus::Ok;
190+
}
191+
186192
TKqpPhysicalQuery query(input);
187193

188194
TVector<TKqpPhysicalTx> txs;
@@ -228,6 +234,7 @@ class TKqpTxsHashFuncPropagateTransformer : public TSyncTransformerBase {
228234

229235
TAutoPtr<IGraphTransformer> TxTransformer;
230236
TAutoPtr<NYql::IGraphTransformer> TypeAnnTransformer;
237+
bool ShuffleEliminationEnabled = false;
231238
};
232239

233240
TAutoPtr<IGraphTransformer> NKikimr::NKqp::CreateKqpTxsHashFuncPropagateTransformer(

0 commit comments

Comments
 (0)