[opt](Nereids) use enable_nereids_dml to control ctas and create table (#29284)
This commit is contained in:
@ -73,6 +73,14 @@ public class CreateTableCommand extends Command implements ForwardWithSync {
|
||||
|
||||
@Override
|
||||
public void run(ConnectContext ctx, StmtExecutor executor) throws Exception {
|
||||
if (!ctx.getSessionVariable().isEnableNereidsDML()) {
|
||||
try {
|
||||
ctx.getSessionVariable().enableFallbackToOriginalPlannerOnce();
|
||||
} catch (Exception e) {
|
||||
throw new AnalysisException("failed to set fallback to original planner to true", e);
|
||||
}
|
||||
throw new AnalysisException("Nereids DML is disabled, will try to fall back to the original planner");
|
||||
}
|
||||
if (!ctasQuery.isPresent()) {
|
||||
createTableInfo.validate(ctx);
|
||||
CreateTableStmt createTableStmt = createTableInfo.translateToLegacyStmt();
|
||||
|
||||
Reference in New Issue
Block a user