diff --git a/fe/fe-core/src/main/java/org/apache/doris/job/extensions/insert/InsertTask.java b/fe/fe-core/src/main/java/org/apache/doris/job/extensions/insert/InsertTask.java index 266f3f8476f7154..1c41c243f7d7d75 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/job/extensions/insert/InsertTask.java +++ b/fe/fe-core/src/main/java/org/apache/doris/job/extensions/insert/InsertTask.java @@ -155,7 +155,6 @@ public void before() throws JobException { ctx.setDatabase(currentDb); } TUniqueId queryId = generateQueryId(UUID.randomUUID().toString()); - ctx.getSessionVariable().enableFallbackToOriginalPlanner = false; stmtExecutor = new StmtExecutor(ctx, (String) null); ctx.setQueryId(queryId); if (StringUtils.isNotEmpty(sql)) { diff --git a/fe/fe-core/src/main/java/org/apache/doris/load/ExportTaskExecutor.java b/fe/fe-core/src/main/java/org/apache/doris/load/ExportTaskExecutor.java index 1424f3bc3010cf7..569693570668468 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/load/ExportTaskExecutor.java +++ b/fe/fe-core/src/main/java/org/apache/doris/load/ExportTaskExecutor.java @@ -172,7 +172,6 @@ private AutoCloseConnectContext buildConnectContext() { connectContext.setSessionVariable(exportJob.getSessionVariables()); // The rollback to the old optimizer is prohibited // Since originStmt is empty, reverting to the old optimizer when the new optimizer is enabled is meaningless. - connectContext.getSessionVariable().enableFallbackToOriginalPlanner = false; connectContext.setEnv(Env.getCurrentEnv()); connectContext.setDatabase(exportJob.getTableName().getDb()); connectContext.setQualifiedUser(exportJob.getQualifiedUser()); diff --git a/fe/fe-core/src/main/java/org/apache/doris/mtmv/MTMVPlanUtil.java b/fe/fe-core/src/main/java/org/apache/doris/mtmv/MTMVPlanUtil.java index 8fb56f5ddac0341..6ba8b63ef58c772 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/mtmv/MTMVPlanUtil.java +++ b/fe/fe-core/src/main/java/org/apache/doris/mtmv/MTMVPlanUtil.java @@ -54,7 +54,6 @@ public static ConnectContext createMTMVContext(MTMV mtmv) { ctx.setCurrentUserIdentity(UserIdentity.ADMIN); ctx.getState().reset(); ctx.setThreadLocalInfo(); - ctx.getSessionVariable().enableFallbackToOriginalPlanner = false; ctx.getSessionVariable().allowModifyMaterializedViewData = true; Optional workloadGroup = mtmv.getWorkloadGroup(); if (workloadGroup.isPresent()) { diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/analyzer/UnboundTableSinkCreator.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/analyzer/UnboundTableSinkCreator.java index 6c361c36f055a39..b755a3dd9461970 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/analyzer/UnboundTableSinkCreator.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/analyzer/UnboundTableSinkCreator.java @@ -24,6 +24,7 @@ import org.apache.doris.datasource.hive.HMSExternalCatalog; import org.apache.doris.datasource.iceberg.IcebergExternalCatalog; import org.apache.doris.nereids.exceptions.AnalysisException; +import org.apache.doris.nereids.exceptions.MustFallbackException; import org.apache.doris.nereids.exceptions.ParseException; import org.apache.doris.nereids.trees.plans.Plan; import org.apache.doris.nereids.trees.plans.commands.info.DMLCommandType; @@ -112,17 +113,16 @@ public static LogicalSink createUnboundTableSinkMaybeOverwrite(L dmlCommandType, Optional.empty(), Optional.empty(), plan); } // TODO: we need to support insert into other catalog - try { - if (ConnectContext.get() != null) { - ConnectContext.get().getSessionVariable().enableFallbackToOriginalPlannerOnce(); - } - } catch (Exception e) { - // ignore this. + if (curCatalog instanceof HMSExternalCatalog + || curCatalog instanceof IcebergExternalCatalog) { + throw new AnalysisException( + (isOverwrite ? "insert overwrite" : "insert") + " data to " + curCatalog.getClass().getSimpleName() + + " is not supported." + + (isAutoDetectPartition + ? " PARTITION(*) is only supported in overwrite partition for OLAP table" : "")); + } else { + throw new MustFallbackException("not support insert into " + curCatalog.getType() + + " catalog " + curCatalog.getName()); } - throw new AnalysisException( - (isOverwrite ? "insert overwrite" : "insert") + " data to " + curCatalog.getClass().getSimpleName() - + " is not supported." - + (isAutoDetectPartition - ? " PARTITION(*) is only supported in overwrite partition for OLAP table" : "")); } } diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/BindSink.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/BindSink.java index 6d8ad94242b53c1..1778fa04b741cc0 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/BindSink.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/BindSink.java @@ -106,7 +106,7 @@ public List buildRules() { return fileSink.withOutputExprs(output); }) ), - // TODO: bind hive taget table + // TODO: bind hive target table RuleType.BINDING_INSERT_HIVE_TABLE.build(unboundHiveTableSink().thenApply(this::bindHiveTableSink)), RuleType.BINDING_INSERT_ICEBERG_TABLE.build( unboundIcebergTableSink().thenApply(this::bindIcebergTableSink)) @@ -530,11 +530,6 @@ private Pair bind(CascadesContext cascadesContext, UnboundT Pair, TableIf> pair = RelationUtil.getDbAndTable(tableQualifier, cascadesContext.getConnectContext().getEnv()); if (!(pair.second instanceof OlapTable)) { - try { - cascadesContext.getConnectContext().getSessionVariable().enableFallbackToOriginalPlannerOnce(); - } catch (Exception e) { - throw new AnalysisException("fall back failed"); - } throw new AnalysisException("the target table of insert into is not an OLAP table"); } return Pair.of(((Database) pair.first), (OlapTable) pair.second); diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/EliminateLogicalSelectHint.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/EliminateLogicalSelectHint.java index ebff9f838a447e1..b0f55365f332fd9 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/EliminateLogicalSelectHint.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/EliminateLogicalSelectHint.java @@ -23,6 +23,7 @@ import org.apache.doris.nereids.CascadesContext; import org.apache.doris.nereids.StatementContext; import org.apache.doris.nereids.exceptions.AnalysisException; +import org.apache.doris.nereids.exceptions.MustFallbackException; import org.apache.doris.nereids.hint.Hint; import org.apache.doris.nereids.hint.LeadingHint; import org.apache.doris.nereids.hint.OrderedHint; @@ -111,12 +112,7 @@ private void setVar(SelectHintSetVar selectHint, StatementContext context) { // enable_fallback_to_original_planner=true and revert it after executing. // throw exception to fall back to original planner if (!sessionVariable.isEnableNereidsPlanner()) { - try { - sessionVariable.enableFallbackToOriginalPlannerOnce(); - } catch (Throwable t) { - throw new AnalysisException("failed to set fallback to original planner to true", t); - } - throw new AnalysisException("The nereids is disabled in this sql, fallback to original planner"); + throw new MustFallbackException("The nereids is disabled in this sql, fallback to original planner"); } } diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/ConnectProcessor.java b/fe/fe-core/src/main/java/org/apache/doris/qe/ConnectProcessor.java index 8f6faf41598cc43..eab4b57e5b68324 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/qe/ConnectProcessor.java +++ b/fe/fe-core/src/main/java/org/apache/doris/qe/ConnectProcessor.java @@ -300,7 +300,7 @@ public void executeQuery(MysqlCommand mysqlCommand, String originStmt) throws Ex } } - if (stmts == null && !ctx.getSessionVariable().enableFallbackToOriginalPlanner) { + if (stmts == null) { String errMsg; Throwable exception = null; if (nereidsParseException != null) { diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java b/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java index 8db240062932490..fef1cc5bb290454 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java +++ b/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java @@ -1440,7 +1440,7 @@ public void setEnableLeftZigZag(boolean enableLeftZigZag) { // This variable is used to avoid FE fallback to the original parser. When we execute SQL in regression tests // for nereids, fallback will cause the Doris return the correct result although the syntax is unsupported // in nereids for some mistaken modification. You should set it on the - @VariableMgr.VarAttr(name = ENABLE_FALLBACK_TO_ORIGINAL_PLANNER, needForward = true) + @VariableMgr.VarAttr(name = ENABLE_FALLBACK_TO_ORIGINAL_PLANNER, varType = VariableAnnotation.REMOVED) public boolean enableFallbackToOriginalPlanner = false; @VariableMgr.VarAttr(name = ENABLE_NEREIDS_TIMEOUT, needForward = true) @@ -4056,15 +4056,6 @@ public void disableStrictConsistencyDmlOnce() throws DdlException { new SetVar(SessionVariable.ENABLE_STRICT_CONSISTENCY_DML, new StringLiteral("false"))); } - public void enableFallbackToOriginalPlannerOnce() throws DdlException { - if (enableFallbackToOriginalPlanner) { - return; - } - setIsSingleSetVar(true); - VariableMgr.setVar(this, - new SetVar(SessionVariable.ENABLE_FALLBACK_TO_ORIGINAL_PLANNER, new StringLiteral("true"))); - } - public void disableConstantFoldingByBEOnce() throws DdlException { if (!enableFoldConstantByBe) { return; diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java b/fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java index 6aa2d6d1e0bf7b7..48037bdc376aea3 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java +++ b/fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java @@ -618,8 +618,7 @@ public void execute(TUniqueId queryId) throws Exception { throw new AnalysisException(e.getMessage()); } if (e instanceof NereidsException - && !(((NereidsException) e).getException() instanceof MustFallbackException) - && !context.getSessionVariable().enableFallbackToOriginalPlanner) { + && !(((NereidsException) e).getException() instanceof MustFallbackException)) { LOG.warn("Analyze failed. {}", context.getQueryIdentifier(), e); context.getState().setError(e.getMessage()); return; @@ -3521,7 +3520,7 @@ public HttpStreamParams generateHttpStreamPlan(TUniqueId queryId) throws Excepti throw ((NereidsException) e).getException(); } if (e instanceof NereidsException - && !context.getSessionVariable().enableFallbackToOriginalPlanner) { + && !(((NereidsException) e).getException() instanceof MustFallbackException)) { LOG.warn("Analyze failed. {}", context.getQueryIdentifier(), e); throw ((NereidsException) e).getException(); } diff --git a/fe/fe-core/src/test/java/org/apache/doris/analysis/BulkLoadDataDescTest.java b/fe/fe-core/src/test/java/org/apache/doris/analysis/BulkLoadDataDescTest.java index 99c838914e217e0..e49b19b67f58653 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/analysis/BulkLoadDataDescTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/analysis/BulkLoadDataDescTest.java @@ -69,7 +69,6 @@ public class BulkLoadDataDescTest extends TestWithFeService { @Override protected void runBeforeAll() throws Exception { connectContext.getState().setNereids(true); - connectContext.getSessionVariable().enableFallbackToOriginalPlanner = false; connectContext.getSessionVariable().enableNereidsTimeout = false; FeConstants.runningUnitTest = true; diff --git a/fe/fe-core/src/test/java/org/apache/doris/catalog/CreateFunctionTest.java b/fe/fe-core/src/test/java/org/apache/doris/catalog/CreateFunctionTest.java index 2bb52114dae32f2..17a4b5fe04a7309 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/catalog/CreateFunctionTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/catalog/CreateFunctionTest.java @@ -74,7 +74,6 @@ public static void teardown() { public void test() throws Exception { ConnectContext ctx = UtFrameUtils.createDefaultCtx(); ctx.getSessionVariable().setEnableNereidsPlanner(false); - ctx.getSessionVariable().enableFallbackToOriginalPlanner = true; ctx.getSessionVariable().setEnableFoldConstantByBe(false); // create database db1 createDatabase(ctx, "create database db1;"); diff --git a/fe/fe-core/src/test/java/org/apache/doris/datasource/hive/HiveDDLAndDMLPlanTest.java b/fe/fe-core/src/test/java/org/apache/doris/datasource/hive/HiveDDLAndDMLPlanTest.java index 9d91ead5d4cccca..b25c7501929226c 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/datasource/hive/HiveDDLAndDMLPlanTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/datasource/hive/HiveDDLAndDMLPlanTest.java @@ -86,7 +86,6 @@ public class HiveDDLAndDMLPlanTest extends TestWithFeService { @Override protected void runBeforeAll() throws Exception { - connectContext.getSessionVariable().enableFallbackToOriginalPlanner = false; Config.enable_query_hive_views = false; // create test internal table createDatabase(mockedDbName); diff --git a/fe/fe-core/src/test/java/org/apache/doris/external/hms/HmsCatalogTest.java b/fe/fe-core/src/test/java/org/apache/doris/external/hms/HmsCatalogTest.java index b968d27b5b84e50..e6281fd8f2fa202 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/external/hms/HmsCatalogTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/external/hms/HmsCatalogTest.java @@ -339,7 +339,6 @@ public void testQueryView() { SessionVariable sv = connectContext.getSessionVariable(); Assertions.assertNotNull(sv); sv.setEnableNereidsPlanner(true); - sv.enableFallbackToOriginalPlanner = false; createDbAndTableForHmsCatalog((HMSExternalCatalog) env.getCatalogMgr().getCatalog(HMS_CATALOG)); queryViews(false); diff --git a/fe/fe-core/src/test/java/org/apache/doris/nereids/preprocess/SelectHintTest.java b/fe/fe-core/src/test/java/org/apache/doris/nereids/preprocess/SelectHintTest.java index f548a499cad342f..e936847053c946e 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/nereids/preprocess/SelectHintTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/nereids/preprocess/SelectHintTest.java @@ -20,7 +20,7 @@ import org.apache.doris.catalog.Env; import org.apache.doris.nereids.NereidsPlanner; import org.apache.doris.nereids.StatementContext; -import org.apache.doris.nereids.exceptions.AnalysisException; +import org.apache.doris.nereids.exceptions.MustFallbackException; import org.apache.doris.nereids.parser.NereidsParser; import org.apache.doris.nereids.properties.PhysicalProperties; import org.apache.doris.qe.ConnectContext; @@ -59,13 +59,11 @@ public void testFallbackToOriginalPlanner() throws Exception { SessionVariable sv = ctx.getSessionVariable(); Assertions.assertNotNull(sv); sv.setEnableNereidsPlanner(true); - sv.enableFallbackToOriginalPlanner = false; - Assertions.assertThrows(AnalysisException.class, () -> new NereidsPlanner(statementContext) + Assertions.assertThrows(MustFallbackException.class, () -> new NereidsPlanner(statementContext) .planWithLock(new NereidsParser().parseSingle(sql), PhysicalProperties.ANY)); // manually recover sv sv.setEnableNereidsPlanner(true); - sv.enableFallbackToOriginalPlanner = false; StmtExecutor stmtExecutor = new StmtExecutor(ctx, sql); new Expectations(stmtExecutor) { @@ -77,6 +75,5 @@ public void testFallbackToOriginalPlanner() throws Exception { stmtExecutor.execute(); Assertions.assertTrue(sv.isEnableNereidsPlanner()); - Assertions.assertFalse(sv.enableFallbackToOriginalPlanner); } } diff --git a/regression-test/suites/datatype_p0/agg_state/nereids/test_agg_state_nereids.groovy b/regression-test/suites/datatype_p0/agg_state/nereids/test_agg_state_nereids.groovy index cc5f9d45ca0d185..5c0217e9d473613 100644 --- a/regression-test/suites/datatype_p0/agg_state/nereids/test_agg_state_nereids.groovy +++ b/regression-test/suites/datatype_p0/agg_state/nereids/test_agg_state_nereids.groovy @@ -18,7 +18,6 @@ suite("test_agg_state_nereids") { sql "set enable_agg_state=true" sql "set enable_nereids_planner=true;" - sql "set enable_fallback_to_original_planner=false;" sql """ DROP TABLE IF EXISTS d_table; """ sql """ @@ -62,15 +61,12 @@ suite("test_agg_state_nereids") { sql "insert into a_table select 1,max_by_state(1,3);" sql "insert into a_table select 1,max_by_state(2,2);" sql "insert into a_table select 1,max_by_state(3,1);" - sql 'set enable_fallback_to_original_planner=false' qt_length1 """select k1,length(k2) from a_table order by k1;""" qt_group1 """select k1,max_by_merge(k2) from a_table group by k1 order by k1;""" qt_merge1 """select max_by_merge(k2) from a_table;""" - sql 'set enable_fallback_to_original_planner=true' sql "insert into a_table select k1+1, max_by_state(k2,k1+10) from d_table;" - sql 'set enable_fallback_to_original_planner=false' qt_length2 """select k1,length(k2) from a_table order by k1;""" qt_group2 """select k1,max_by_merge(k2) from a_table group by k1 order by k1;""" diff --git a/regression-test/suites/datatype_p0/decimalv3/test_decimalv3.groovy b/regression-test/suites/datatype_p0/decimalv3/test_decimalv3.groovy index 2bcdc58f4b7d48e..45d1d27e584c658 100644 --- a/regression-test/suites/datatype_p0/decimalv3/test_decimalv3.groovy +++ b/regression-test/suites/datatype_p0/decimalv3/test_decimalv3.groovy @@ -68,7 +68,6 @@ suite("test_decimalv3") { // nereids sql "set enable_nereids_planner = true;" - sql """ set enable_fallback_to_original_planner=false """ sql "set enable_decimal256 = true;" qt_decimal256_const_0 "select 1.4E-45;" qt_decimal256_const_1 "select 1.4E-80;" @@ -76,7 +75,6 @@ suite("test_decimalv3") { qt_decimal256_const_2 "select 1.4E-45;" qt_decimal256_const_3 "select 1.4E-80;" - sql """ set enable_fallback_to_original_planner=true """ sql "set enable_decimal256 = true;" qt_decimal256_const_4 "select 1.4E-45;" qt_decimal256_const_5 "select 1.4E-80;" diff --git a/regression-test/suites/javaudf_p0/test_javaudtf_int.groovy b/regression-test/suites/javaudf_p0/test_javaudtf_int.groovy index 50383f681ec6fb3..f9d64837a6a6100 100644 --- a/regression-test/suites/javaudf_p0/test_javaudtf_int.groovy +++ b/regression-test/suites/javaudf_p0/test_javaudtf_int.groovy @@ -68,8 +68,8 @@ suite("test_javaudtf_int") { qt_select1 """ SELECT user_id, varchar_col, e1 FROM ${tableName} lateral view udtf_int(user_id) temp as e1 order by user_id; """ test { - sql """ select /*+SET_VAR(enable_fallback_to_original_planner=true)*/ udtf_int(1); """ - exception "UDTF function do not support this" + sql """ select udtf_int(1); """ + exception "PROJECT can not contains TableGeneratingFunction expression: udtf_int(1)" } } finally { try_sql("DROP FUNCTION IF EXISTS udtf_int(int);") diff --git a/regression-test/suites/json_p0/test_json_predict_is_null.groovy b/regression-test/suites/json_p0/test_json_predict_is_null.groovy index ed47a2934f8a8b8..7f8a46e661c34ef 100644 --- a/regression-test/suites/json_p0/test_json_predict_is_null.groovy +++ b/regression-test/suites/json_p0/test_json_predict_is_null.groovy @@ -18,11 +18,6 @@ import org.codehaus.groovy.runtime.IOGroovyMethods suite("test_json_predict_is_null", "p0") { - sql """ set experimental_enable_nereids_planner = false """ - - sql """ set experimental_enable_nereids_planner = true """ - sql """ set enable_fallback_to_original_planner = true """ - sql "DROP TABLE IF EXISTS j_pred" sql """ diff --git a/regression-test/suites/jsonb_p0/test_jsonb_cast.groovy b/regression-test/suites/jsonb_p0/test_jsonb_cast.groovy index f04b8a6969290e4..1fc4524dc8a2299 100644 --- a/regression-test/suites/jsonb_p0/test_jsonb_cast.groovy +++ b/regression-test/suites/jsonb_p0/test_jsonb_cast.groovy @@ -23,9 +23,6 @@ suite("test_jsonb_cast", "p0") { def testTable = "tbl_test_array_text_cast_jsonb" def dataFile = "test_jsonb_cast.csv" - sql """ set experimental_enable_nereids_planner = true """ - sql """ set enable_fallback_to_original_planner = true """ - sql "DROP TABLE IF EXISTS ${testTable}" sql """ diff --git a/regression-test/suites/jsonb_p0/test_jsonb_predict_is_null.groovy b/regression-test/suites/jsonb_p0/test_jsonb_predict_is_null.groovy index c97d04699083209..5877b4e0f4bcbb7 100644 --- a/regression-test/suites/jsonb_p0/test_jsonb_predict_is_null.groovy +++ b/regression-test/suites/jsonb_p0/test_jsonb_predict_is_null.groovy @@ -18,11 +18,6 @@ import org.codehaus.groovy.runtime.IOGroovyMethods suite("test_jsonb_predict_is_null", "p0") { - sql """ set experimental_enable_nereids_planner = false """ - - sql """ set experimental_enable_nereids_planner = true """ - sql """ set enable_fallback_to_original_planner = true """ - sql "DROP TABLE IF EXISTS jb_pred" sql """ diff --git a/regression-test/suites/jsonb_p0/test_jsonb_with_unescaped_string.groovy b/regression-test/suites/jsonb_p0/test_jsonb_with_unescaped_string.groovy index b728c46cb20c933..8aeab1df4bf4a9b 100644 --- a/regression-test/suites/jsonb_p0/test_jsonb_with_unescaped_string.groovy +++ b/regression-test/suites/jsonb_p0/test_jsonb_with_unescaped_string.groovy @@ -24,9 +24,6 @@ suite("test_jsonb_with_unescaped_string", "p0") { def dataFile = "test_jsonb_unescaped.csv" def dataFileJson = "test_jsonb_unescaped.json" - sql """ set experimental_enable_nereids_planner = true """ - sql """ set enable_fallback_to_original_planner = true """ - sql "DROP TABLE IF EXISTS ${testTable}" sql """ diff --git a/regression-test/suites/nereids_p0/insert_into_table/no_partition.groovy b/regression-test/suites/nereids_p0/insert_into_table/no_partition.groovy index f53627dc70a4b23..8222fdb795ea479 100644 --- a/regression-test/suites/nereids_p0/insert_into_table/no_partition.groovy +++ b/regression-test/suites/nereids_p0/insert_into_table/no_partition.groovy @@ -281,17 +281,10 @@ suite('nereids_insert_no_partition') { sql '''delete from uni_light_sc_mow_nop_t where id is not null''' sql '''delete from uni_light_sc_mow_nop_t where id is null''' - // TODO turn off fallback when storage layer support true predicate - sql '''set enable_fallback_to_original_planner=true''' sql '''delete from uni_mow_not_null_nop_t where id is not null''' - sql '''set enable_fallback_to_original_planner=false''' - sql '''delete from uni_mow_not_null_nop_t where id is null''' - // TODO turn off fallback when storage layer support true predicate - sql '''set enable_fallback_to_original_planner=true''' sql '''delete from uni_light_sc_mow_not_null_nop_t where id is not null''' - sql '''set enable_fallback_to_original_planner=false''' sql '''delete from uni_light_sc_mow_not_null_nop_t where id is null''' sql 'alter table agg_light_sc_nop_t rename column ktinyint ktint' diff --git a/regression-test/suites/nereids_p0/insert_into_table/partial_update.groovy b/regression-test/suites/nereids_p0/insert_into_table/partial_update.groovy index fd2145a71ed7b2d..153cbe83938de36 100644 --- a/regression-test/suites/nereids_p0/insert_into_table/partial_update.groovy +++ b/regression-test/suites/nereids_p0/insert_into_table/partial_update.groovy @@ -281,7 +281,6 @@ suite("nereids_partial_update_native_insert_stmt", "p0") { sql "set enable_unique_key_partial_update=false;" sql "set enable_insert_strict = false;" - sql "set enable_fallback_to_original_planner=true;" sql "sync;" } } diff --git a/regression-test/suites/nereids_p0/insert_into_table/partial_update_complex.groovy b/regression-test/suites/nereids_p0/insert_into_table/partial_update_complex.groovy index a8433241e2efa23..7b33dca57a4d52b 100644 --- a/regression-test/suites/nereids_p0/insert_into_table/partial_update_complex.groovy +++ b/regression-test/suites/nereids_p0/insert_into_table/partial_update_complex.groovy @@ -127,7 +127,6 @@ suite("nereids_partial_update_native_insert_stmt_complex", "p0") { sql "set enable_unique_key_partial_update=false;" sql "set enable_insert_strict = false;" - sql "set enable_fallback_to_original_planner=true;" sql "sync;" } } diff --git a/regression-test/suites/nereids_p0/insert_into_table/unsupport_type.groovy b/regression-test/suites/nereids_p0/insert_into_table/unsupport_type.groovy index 24e31bb064b7c1e..d20c635f10df7c6 100644 --- a/regression-test/suites/nereids_p0/insert_into_table/unsupport_type.groovy +++ b/regression-test/suites/nereids_p0/insert_into_table/unsupport_type.groovy @@ -19,12 +19,8 @@ suite("nereids_insert_unsupport_type") { sql 'use nereids_insert_into_table_test' sql 'set enable_nereids_planner=true' - sql 'set enable_fallback_to_original_planner=false' - sql 'set enable_nereids_dml=true' sql 'set enable_strict_consistency_dml=true' - sql 'set enable_fallback_to_original_planner=true' - sql 'insert into map_t select id, kmintint from src' sql 'sync' sql 'select * from map_t' diff --git a/regression-test/suites/nereids_p0/test_timeout_fallback.groovy b/regression-test/suites/nereids_p0/test_timeout_fallback.groovy index 084fe9c8a197efe..e471ec881427382 100644 --- a/regression-test/suites/nereids_p0/test_timeout_fallback.groovy +++ b/regression-test/suites/nereids_p0/test_timeout_fallback.groovy @@ -17,7 +17,6 @@ suite("test_timeout_fallback") { sql "set enable_nereids_planner=true" - sql "set enable_fallback_to_original_planner=true" sql "set enable_nereids_timeout=true" sql "set nereids_timeout_second=-1" diff --git a/regression-test/suites/nereids_rules_p0/grouping_sets/valid_grouping.groovy b/regression-test/suites/nereids_rules_p0/grouping_sets/valid_grouping.groovy index dd69f23f027f214..624fc7e9f159ccb 100644 --- a/regression-test/suites/nereids_rules_p0/grouping_sets/valid_grouping.groovy +++ b/regression-test/suites/nereids_rules_p0/grouping_sets/valid_grouping.groovy @@ -16,7 +16,10 @@ // under the License. suite("valid_grouping"){ - sql "SET enable_fallback_to_original_planner=true" + + // this suite test legacy planner + sql "set enable_nereids_planner=false" + sql "drop table if exists valid_grouping" sql """ CREATE TABLE `valid_grouping` ( diff --git a/regression-test/suites/nereids_syntax_p0/aggregate_strategies.groovy b/regression-test/suites/nereids_syntax_p0/aggregate_strategies.groovy index e2f5d8e0cf0acca..1b546db0ff8eae2 100644 --- a/regression-test/suites/nereids_syntax_p0/aggregate_strategies.groovy +++ b/regression-test/suites/nereids_syntax_p0/aggregate_strategies.groovy @@ -18,8 +18,6 @@ suite("aggregate_strategies") { def test_aggregate_strategies = { tableName, bucketNum -> - sql "SET enable_fallback_to_original_planner=true" - sql "drop table if exists $tableName" sql """CREATE TABLE `$tableName` ( `id` int(11) NOT NULL, @@ -40,10 +38,6 @@ suite("aggregate_strategies") { sql "insert into $tableName select number, concat('name_', number) from numbers('number'='5')" sql "insert into $tableName select number, concat('name_', number) from numbers('number'='5')" - - sql "SET enable_nereids_planner=true" - sql "SET enable_fallback_to_original_planner=false" - order_qt_count_all "select count(ALL *) from $tableName" order_qt_count_all "select count(*) from $tableName" order_qt_count_all_group_by "select count(*) from $tableName group by id" @@ -200,6 +194,5 @@ suite("aggregate_strategies") { qt_sql_distinct_same_col """SELECT COUNT(DISTINCT id, id) FROM test_bucket10_table GROUP BY id """ - sql "set experimental_enable_pipeline_engine=true" qt_sql_distinct_same_col2 """SELECT COUNT(DISTINCT id, id) FROM test_bucket10_table GROUP BY id """ } diff --git a/regression-test/suites/nereids_syntax_p0/filter_to_select.groovy b/regression-test/suites/nereids_syntax_p0/filter_to_select.groovy index f967ae9913c0c7a..7ff0fade3b252c2 100644 --- a/regression-test/suites/nereids_syntax_p0/filter_to_select.groovy +++ b/regression-test/suites/nereids_syntax_p0/filter_to_select.groovy @@ -15,9 +15,8 @@ // specific language governing permissions and limitations // under the License. - suite("filter_to_select") { +suite("filter_to_select") { sql "SET enable_nereids_planner=true;" - sql "SET enable_fallback_to_original_planner=true;" sql "drop table if exists t_filter_to_select;" sql """ @@ -35,8 +34,6 @@ insert into t_filter_to_select values (5,4), (6,2), (7,0); """ - sql "SET enable_fallback_to_original_planner=false;" - qt_select """ select * from (select * from t_filter_to_select order by k1 desc limit 2) a where k1 > 5; """ diff --git a/regression-test/suites/nereids_syntax_p0/having.groovy b/regression-test/suites/nereids_syntax_p0/having.groovy index 3db076ea7dfc3bb..5b619a2729aad9e 100644 --- a/regression-test/suites/nereids_syntax_p0/having.groovy +++ b/regression-test/suites/nereids_syntax_p0/having.groovy @@ -18,7 +18,6 @@ suite("test_nereids_having") { sql "SET enable_nereids_planner=true" - sql "SET enable_fallback_to_original_planner=true" sql "DROP TABLE IF EXISTS test_nereids_having_tbl" @@ -44,8 +43,6 @@ suite("test_nereids_having") { (3, 3, 9) """ - sql "SET enable_fallback_to_original_planner=false" - order_qt_select "SELECT a1 as value FROM test_nereids_having_tbl GROUP BY a1 HAVING a1 > 0"; order_qt_select "SELECT a1 as value FROM test_nereids_having_tbl GROUP BY a1 HAVING value > 0"; order_qt_select "SELECT SUM(a2) FROM test_nereids_having_tbl GROUP BY a1 HAVING a1 > 0"; diff --git a/regression-test/suites/nereids_syntax_p0/null_aware_left_anti_join.groovy b/regression-test/suites/nereids_syntax_p0/null_aware_left_anti_join.groovy index 664dc91867425aa..c09358073f98e25 100644 --- a/regression-test/suites/nereids_syntax_p0/null_aware_left_anti_join.groovy +++ b/regression-test/suites/nereids_syntax_p0/null_aware_left_anti_join.groovy @@ -41,34 +41,25 @@ suite("test_nereids_null_aware_left_anti_join") { sql """ insert into ${tableName2} values (1), (2); """ - sql "SET enable_nereids_planner=true" - sql "SET enable_fallback_to_original_planner=false" qt_select """ select ${tableName2}.k1 from ${tableName2} where k1 not in (select ${tableName1}.k1 from ${tableName1}) order by ${tableName2}.k1; """ - sql "SET enable_fallback_to_original_planner=true" sql """ insert into ${tableName2} values(null); """ - sql "SET enable_fallback_to_original_planner=false" qt_select """ select ${tableName2}.k1 from ${tableName2} where k1 not in (select ${tableName1}.k1 from ${tableName1}) order by ${tableName2}.k1; """ - sql "SET enable_fallback_to_original_planner=true" sql """ insert into ${tableName1} values(null); """ - sql "SET enable_fallback_to_original_planner=false" qt_select """ select ${tableName2}.k1 from ${tableName2} where k1 not in (select ${tableName1}.k1 from ${tableName1}) order by ${tableName2}.k1; """ - sql "SET enable_fallback_to_original_planner=true" sql """ set parallel_fragment_exec_instance_num=2; """ sql """ set parallel_pipeline_task_num=2; """ - sql "SET enable_fallback_to_original_planner=false" qt_select """ select ${tableName2}.k1 from ${tableName2} where k1 not in (select ${tableName1}.k1 from ${tableName1}) order by ${tableName2}.k1; """ - sql "SET enable_fallback_to_original_planner=true" sql """ drop table if exists ${tableName2}; """ diff --git a/regression-test/suites/partition_p0/multi_partition/test_multi_partition.groovy b/regression-test/suites/partition_p0/multi_partition/test_multi_partition.groovy index 18e3a09fdc187f9..f1af05d0a0146df 100644 --- a/regression-test/suites/partition_p0/multi_partition/test_multi_partition.groovy +++ b/regression-test/suites/partition_p0/multi_partition/test_multi_partition.groovy @@ -487,7 +487,6 @@ suite("test_multi_partition") { assertTrue(result2[1][1].startsWith("p_")) sql "drop table range_date_cast_to_datetime_multi_partition" - sql """set enable_fallback_to_original_planner=true""" sql """ CREATE TABLE IF NOT EXISTS range_date_cast_to_datetime_multi_partition ( id int, diff --git a/regression-test/suites/partition_p0/multi_partition/test_range_partition.groovy b/regression-test/suites/partition_p0/multi_partition/test_range_partition.groovy index ca58653b75b614b..c5d450df57c47d0 100644 --- a/regression-test/suites/partition_p0/multi_partition/test_range_partition.groovy +++ b/regression-test/suites/partition_p0/multi_partition/test_range_partition.groovy @@ -297,7 +297,6 @@ suite("test_range_partition", "p0") { ) // create one table without datetime partition, but with date string - sql """set enable_fallback_to_original_planner=false""" sql """ CREATE TABLE IF NOT EXISTS range_date_cast_to_datetime_range_partition ( id int, @@ -311,7 +310,6 @@ suite("test_range_partition", "p0") { sql "insert into range_date_cast_to_datetime_range_partition values (1, 'name', '2023-04-19 08:08:30')" sql "drop table range_date_cast_to_datetime_range_partition" - sql """set enable_fallback_to_original_planner=true""" sql """ CREATE TABLE IF NOT EXISTS range_date_cast_to_datetime_range_partition ( id int, diff --git a/regression-test/suites/point_query_p0/test_point_query.groovy b/regression-test/suites/point_query_p0/test_point_query.groovy index f05d0af1305a68e..c987fb7019959c0 100644 --- a/regression-test/suites/point_query_p0/test_point_query.groovy +++ b/regression-test/suites/point_query_p0/test_point_query.groovy @@ -302,7 +302,6 @@ suite("test_point_query", "nonConcurrent") { } finally { set_be_config.call("disable_storage_row_cache", "true") sql """set global enable_nereids_planner=true""" - sql "set global enable_fallback_to_original_planner = true" } // test partial update/delete