[bug]Join order changed when execute with the udf by different parallel hint

This commit is contained in:
akaError
2023-01-10 05:08:04 +00:00
committed by ob-robot
parent 040304870f
commit c0acd5e468
4 changed files with 11 additions and 1 deletions

View File

@ -667,6 +667,12 @@ int ObOptimizer::init_env_info(ObDMLStmt &stmt)
ctx_.set_parallel_rule(PXParallelRule::USE_PX_DEFAULT);
ctx_.set_parallel(ObGlobalHint::DEFAULT_PARALLEL);
}
//following above rule, but if stmt contain pl_udf, force das, parallel should be 1
if (parallel > 1 && ctx_.has_pl_udf()) {
ctx_.set_parallel_rule(PXParallelRule::PL_UDF_DAS_FORCE_SERIALIZE);
ctx_.set_parallel(1);
ctx_.add_plan_note(PARALLEL_DISABLED_BY_PL_UDF_DAS, 1);
}
}
// init column usage info