[opt](Nereids) add switch to control whether use pipeline in DML (#28037)

to turn on pipeline for DML in Nerieds, please:
set enable_nereids_dml_with_pipeline = true;
This commit is contained in:
morrySnow
2023-12-06 17:06:11 +08:00
committed by GitHub
parent bb67e39558
commit 1aa1b2f607
2 changed files with 9 additions and 0 deletions

View File

@ -47,6 +47,9 @@ public class TurnOffPipelineForDml extends PlanPreprocessor {
private void turnOffPipeline(StatementContext context) {
SessionVariable sessionVariable = context.getConnectContext().getSessionVariable();
if (sessionVariable.enableNereidsDmlWithPipeline) {
return;
}
// set temporary session value, and then revert value in the 'finally block' of StmtExecutor#execute
sessionVariable.setIsSingleSetVar(true);
try {

View File

@ -194,6 +194,7 @@ public class SessionVariable implements Serializable, Writable {
public static final String MAX_JOIN_NUMBER_OF_REORDER = "max_join_number_of_reorder";
public static final String ENABLE_NEREIDS_DML = "enable_nereids_dml";
public static final String ENABLE_NEREIDS_DML_WITH_PIPELINE = "enable_nereids_dml_with_pipeline";
public static final String ENABLE_STRICT_CONSISTENCY_DML = "enable_strict_consistency_dml";
public static final String ENABLE_BUSHY_TREE = "enable_bushy_tree";
@ -753,6 +754,11 @@ public class SessionVariable implements Serializable, Writable {
@VariableMgr.VarAttr(name = ENABLE_NEREIDS_DML, needForward = true)
public boolean enableNereidsDML = true;
@VariableMgr.VarAttr(name = ENABLE_NEREIDS_DML_WITH_PIPELINE, needForward = true,
varType = VariableAnnotation.EXPERIMENTAL,
description = {"在新优化器中,使用pipeline引擎执行DML", "execute DML with pipeline engine in Nereids"})
public boolean enableNereidsDmlWithPipeline = false;
@VariableMgr.VarAttr(name = ENABLE_STRICT_CONSISTENCY_DML, needForward = true)
public boolean enableStrictConsistencyDml = false;