This is an automated email from the ASF dual-hosted git repository.
lihaopeng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 9e4411d0f1a [opt] Session var experimental_enable_virtual_slot_for_cse
(#56340)
9e4411d0f1a is described below
commit 9e4411d0f1a9b74db0ce292add8add403c273eaf
Author: zhiqiang <[email protected]>
AuthorDate: Fri Sep 26 17:17:56 2025 +0800
[opt] Session var experimental_enable_virtual_slot_for_cse (#56340)
---
.../PushDownVirtualColumnsIntoOlapScan.java | 11 +++
.../java/org/apache/doris/qe/SessionVariable.java | 8 +++
.../PushDownVirtualColumnsIntoOlapScanTest.java | 81 ++++++++++++++++++++--
.../constant_propagation.groovy | 1 +
.../json_functions/test_json_function.groovy | 1 +
.../adjust_virtual_slot_nullable.groovy | 1 +
.../char_type_shrink_before_project.groovy | 1 +
.../expr_with_runtime_return_type.groovy | 1 +
.../fix_array_type_and_lambda_func.groovy | 1 +
.../return_in_advance_if_block_is_empty.groovy | 1 +
.../virtual_slot_ref/virtual_slot_ref_basic.groovy | 1 +
.../shape_check/tpcds_sf100/rf_prune/query8.groovy | 1 +
.../shape_check/tpcds_sf100/shape/query8.groovy | 1 +
.../tpcds_sf1000/bs_downgrade_shape/query8.groovy | 1 +
.../shape_check/tpcds_sf1000/hint/query8.groovy | 1 +
.../shape_check/tpcds_sf1000/shape/query8.groovy | 1 +
16 files changed, 107 insertions(+), 6 deletions(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownVirtualColumnsIntoOlapScan.java
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownVirtualColumnsIntoOlapScan.java
index 36a8ee3a6d9..2f39251feed 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownVirtualColumnsIntoOlapScan.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownVirtualColumnsIntoOlapScan.java
@@ -62,6 +62,7 @@ import org.apache.doris.nereids.types.StringType;
import org.apache.doris.nereids.types.TinyIntType;
import org.apache.doris.nereids.types.VarcharType;
import org.apache.doris.nereids.util.ExpressionUtils;
+import org.apache.doris.qe.ConnectContext;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
@@ -157,6 +158,11 @@ public class PushDownVirtualColumnsIntoOlapScan implements
RewriteRuleFactory {
return ImmutableList.of(
logicalProject(logicalFilter(logicalOlapScan()
.when(s -> {
+ // Only apply when session variable
experimental_enable_virtual_slot_for_cse is enabled
+ if (ConnectContext.get() == null
+ ||
!ConnectContext.get().getSessionVariable().experimentalEnableVirtualSlotForCse)
{
+ return false;
+ }
boolean dupTblOrMOW = s.getTable().getKeysType()
== KeysType.DUP_KEYS
||
s.getTable().getTableProperty().getEnableUniqueKeyMergeOnWrite();
return dupTblOrMOW &&
s.getVirtualColumns().isEmpty();
@@ -168,6 +174,11 @@ public class PushDownVirtualColumnsIntoOlapScan implements
RewriteRuleFactory {
}).toRule(RuleType.PUSH_DOWN_VIRTUAL_COLUMNS_INTO_OLAP_SCAN),
logicalFilter(logicalOlapScan()
.when(s -> {
+ // Only apply when session variable
experimental_enable_virtual_slot_for_cse is enabled
+ if (ConnectContext.get() == null
+ ||
!ConnectContext.get().getSessionVariable().experimentalEnableVirtualSlotForCse)
{
+ return false;
+ }
boolean dupTblOrMOW = s.getTable().getKeysType()
== KeysType.DUP_KEYS
||
s.getTable().getTableProperty().getEnableUniqueKeyMergeOnWrite();
return dupTblOrMOW &&
s.getVirtualColumns().isEmpty();
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 8018e963b2f..acfb9e112b7 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
@@ -892,6 +892,14 @@ public class SessionVariable implements Serializable,
Writable {
@VariableMgr.VarAttr(name = "enable_aggregate_cse", needForward = true)
public boolean enableAggregateCse = true;
+ // Experimental: enable pushing down virtual slots (common
sub-expressions) into OlapScan.
+ // When false (default), the optimizer rule
PushDownVirtualColumnsIntoOlapScan will not apply.
+ @VariableMgr.VarAttr(name = "enable_virtual_slot_for_cse", needForward =
true,
+ varType = VariableAnnotation.EXPERIMENTAL,
+ description = {"是否启用将公共子表达式作为虚拟列下推到OlapScan(实验特性)",
+ "Enable pushing common sub-expressions as virtual columns
into OlapScan (experimental)"})
+ public boolean experimentalEnableVirtualSlotForCse = false;
+
@VariableMgr.VarAttr(name = JDBC_CLICKHOUSE_QUERY_FINAL, needForward =
true,
description = {"是否在查询 ClickHouse JDBC 外部表时,对查询 SQL 添加 FINAL 关键字。",
"Whether to add the FINAL keyword to the query SQL when
querying ClickHouse JDBC external tables."})
diff --git
a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushDownVirtualColumnsIntoOlapScanTest.java
b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushDownVirtualColumnsIntoOlapScanTest.java
index 431cfb6ca22..db7db44de31 100644
---
a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushDownVirtualColumnsIntoOlapScanTest.java
+++
b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/PushDownVirtualColumnsIntoOlapScanTest.java
@@ -46,6 +46,7 @@ import
org.apache.doris.nereids.trees.expressions.functions.scalar.Lambda;
import org.apache.doris.nereids.trees.expressions.functions.scalar.MultiMatch;
import
org.apache.doris.nereids.trees.expressions.functions.scalar.MultiMatchAny;
import org.apache.doris.nereids.trees.expressions.functions.scalar.Random;
+import org.apache.doris.nereids.trees.expressions.literal.FloatLiteral;
import org.apache.doris.nereids.trees.expressions.literal.IntegerLiteral;
import org.apache.doris.nereids.trees.expressions.literal.StringLiteral;
import org.apache.doris.nereids.trees.plans.Plan;
@@ -68,6 +69,7 @@ import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import java.lang.reflect.Method;
+import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Optional;
@@ -81,6 +83,8 @@ public class PushDownVirtualColumnsIntoOlapScanTest
implements MemoPatternMatchS
@Test
public void testExtractRepeatedSubExpressions() {
+ ConnectContext connectContext = MemoTestUtils.createConnectContext();
+
connectContext.getSessionVariable().experimentalEnableVirtualSlotForCse = true;
// Create a test scenario where a sub-expression is repeated in
multiple conjuncts
// SELECT a, b FROM table WHERE (x + y) > 10 AND (x + y) < 100 AND z =
(x + y)
@@ -141,6 +145,8 @@ public class PushDownVirtualColumnsIntoOlapScanTest
implements MemoPatternMatchS
@Test
public void testExtractDistanceFunctions() {
+ ConnectContext connectContext = MemoTestUtils.createConnectContext();
+
connectContext.getSessionVariable().experimentalEnableVirtualSlotForCse = true;
// Test the existing distance function extraction functionality
DataType intType = IntegerType.INSTANCE;
SlotReference vector1 = new SlotReference("vector1", intType);
@@ -176,8 +182,46 @@ public class PushDownVirtualColumnsIntoOlapScanTest
implements MemoPatternMatchS
Assertions.assertEquals(vector2, distFunc.child(1), "First argument
should be vector2");
}
+ @Test
+ public void testL2DistanceWith768DimVectors() {
+ ConnectContext connectContext = MemoTestUtils.createConnectContext();
+
connectContext.getSessionVariable().experimentalEnableVirtualSlotForCse = true;
+
+ // Build two 768-dim float arrays to simulate embedding vectors
+ List<Expression> v1 = new ArrayList<>(768);
+ List<Expression> v2 = new ArrayList<>(768);
+ for (int i = 0; i < 768; i++) {
+ v1.add(new FloatLiteral((float) i));
+ v2.add(new FloatLiteral((float) (i + 1)));
+ }
+ Array arr1 = new Array(v1);
+ Array arr2 = new Array(v2);
+
+ L2Distance distance = new L2Distance(arr1, arr2);
+ GreaterThan distanceFilter = new GreaterThan(distance, new
FloatLiteral(5.0f));
+
+ // Create OLAP scan and filter
+ LogicalOlapScan scan = PlanConstructor.newLogicalOlapScan(0, "t1", 0);
+ LogicalFilter<LogicalOlapScan> filter = new LogicalFilter<>(
+ ImmutableSet.of(distanceFilter), scan);
+
+ // Apply the rule
+ PushDownVirtualColumnsIntoOlapScan rule = new
PushDownVirtualColumnsIntoOlapScan();
+ List<Rule> rules = rule.buildRules();
+
+ // Should create appropriate rules
+ Assertions.assertEquals(2, rules.size());
+
+ // No CSE should happen since the distance expression appears once
+ PlanChecker.from(connectContext, filter)
+ .applyTopDown(rules)
+ .matches(logicalOlapScan().when(o ->
o.getVirtualColumns().isEmpty()));
+ }
+
@Test
public void testComplexRepeatedExpressions() {
+ ConnectContext connectContext = MemoTestUtils.createConnectContext();
+
connectContext.getSessionVariable().experimentalEnableVirtualSlotForCse = true;
// Test with more complex repeated expressions
// SELECT * FROM table WHERE (x * y + z) > 10 AND (x * y + z) < 100
@@ -227,6 +271,8 @@ public class PushDownVirtualColumnsIntoOlapScanTest
implements MemoPatternMatchS
@Test
public void testSkipWhenClause() {
+ ConnectContext connectContext = MemoTestUtils.createConnectContext();
+
connectContext.getSessionVariable().experimentalEnableVirtualSlotForCse = true;
// Test that WhenClause expressions are not optimized as common
sub-expressions
// SELECT * FROM table WHERE CASE WHEN x = 1 THEN 'abc' ELSE WHEN x =
1 THEN 'abc' END != 'def'
@@ -259,13 +305,15 @@ public class PushDownVirtualColumnsIntoOlapScanTest
implements MemoPatternMatchS
// WhenClause expressions should NOT be optimized, but the rule should
still match the pattern
Assertions.assertTrue(hasMatchingRule, "Rule should match the filter
pattern");
- PlanChecker.from(MemoTestUtils.createConnectContext(), filter)
+ PlanChecker.from(connectContext, filter)
.applyTopDown(rules)
.matches(logicalOlapScan().when(o ->
o.getVirtualColumns().isEmpty()));
}
@Test
public void testSkipCastExpressions() {
+ ConnectContext connectContext = MemoTestUtils.createConnectContext();
+
connectContext.getSessionVariable().experimentalEnableVirtualSlotForCse = true;
// Test that CAST expressions are not optimized as common
sub-expressions
// SELECT * FROM table WHERE CAST(x AS VARCHAR) = 'abc' AND CAST(x AS
VARCHAR) != 'def'
@@ -304,7 +352,7 @@ public class PushDownVirtualColumnsIntoOlapScanTest
implements MemoPatternMatchS
// CAST expressions should NOT be optimized, but the rule should still
match the pattern
Assertions.assertTrue(hasMatchingRule, "Rule should match the filter
pattern");
- PlanChecker.from(MemoTestUtils.createConnectContext(), filter)
+ PlanChecker.from(connectContext, filter)
.applyTopDown(rules)
.matches(logicalOlapScan().when(o ->
o.getVirtualColumns().isEmpty()));
}
@@ -315,6 +363,7 @@ public class PushDownVirtualColumnsIntoOlapScanTest
implements MemoPatternMatchS
// With the new logic, any expression tree containing lambda should
not be optimized
ConnectContext connectContext = MemoTestUtils.createConnectContext();
+
connectContext.getSessionVariable().experimentalEnableVirtualSlotForCse = true;
// Create OLAP scan
LogicalOlapScan scan = PlanConstructor.newLogicalOlapScan(0, "t1", 0);
@@ -361,6 +410,8 @@ public class PushDownVirtualColumnsIntoOlapScanTest
implements MemoPatternMatchS
@Test
public void testMixedComplexExpressions() {
+ ConnectContext connectContext = MemoTestUtils.createConnectContext();
+
connectContext.getSessionVariable().experimentalEnableVirtualSlotForCse = true;
// Test with a mix of optimizable and non-optimizable expressions
// SELECT * FROM table WHERE
// (x + y) > 10 AND -- optimizable
@@ -421,6 +472,8 @@ public class PushDownVirtualColumnsIntoOlapScanTest
implements MemoPatternMatchS
@Test
public void testNoOptimizationWhenNoRepeatedExpressions() {
+ ConnectContext connectContext = MemoTestUtils.createConnectContext();
+
connectContext.getSessionVariable().experimentalEnableVirtualSlotForCse = true;
// Test that no optimization occurs when there are no repeated
expressions
// SELECT * FROM table WHERE x > 10 AND y < 100 AND z = 50
@@ -463,6 +516,8 @@ public class PushDownVirtualColumnsIntoOlapScanTest
implements MemoPatternMatchS
@Test
public void testRulePatternMatching() {
+ ConnectContext connectContext = MemoTestUtils.createConnectContext();
+
connectContext.getSessionVariable().experimentalEnableVirtualSlotForCse = true;
// Test that rules correctly match different plan patterns
DataType intType = IntegerType.INSTANCE;
@@ -835,6 +890,8 @@ public class PushDownVirtualColumnsIntoOlapScanTest
implements MemoPatternMatchS
@Test
public void testSkipGroupingFunctionsInFilter() {
+ ConnectContext connectContext = MemoTestUtils.createConnectContext();
+
connectContext.getSessionVariable().experimentalEnableVirtualSlotForCse = true;
// Ensure expressions containing grouping() are completely skipped
LogicalOlapScan scan = PlanConstructor.newLogicalOlapScan(0, "t1", 0);
SlotReference x = (SlotReference) scan.getOutput().get(0);
@@ -844,13 +901,15 @@ public class PushDownVirtualColumnsIntoOlapScanTest
implements MemoPatternMatchS
// even if repeated, should not extract
LogicalFilter<LogicalOlapScan> filter = new LogicalFilter<>(
ImmutableSet.of(new EqualTo(grouping1, grouping2)), scan);
- PlanChecker.from(MemoTestUtils.createConnectContext(), filter)
+ PlanChecker.from(connectContext, filter)
.applyTopDown(new PushDownVirtualColumnsIntoOlapScan())
.matches(logicalOlapScan().when(o ->
o.getVirtualColumns().isEmpty()));
}
@Test
public void testSkipGroupingFunctionsInProject() {
+ ConnectContext connectContext = MemoTestUtils.createConnectContext();
+
connectContext.getSessionVariable().experimentalEnableVirtualSlotForCse = true;
// Ensure grouping() in project is not extracted or altered by CSE
LogicalOlapScan scan = PlanConstructor.newLogicalOlapScan(0, "t1", 0);
SlotReference x = (SlotReference) scan.getOutput().get(0);
@@ -866,7 +925,7 @@ public class PushDownVirtualColumnsIntoOlapScanTest
implements MemoPatternMatchS
);
LogicalProject<LogicalFilter<LogicalOlapScan>> project = new
LogicalProject<>(projects, filter);
- Plan result = PlanChecker.from(MemoTestUtils.createConnectContext(),
project)
+ Plan result = PlanChecker.from(connectContext, project)
.applyTopDown(new PushDownVirtualColumnsIntoOlapScan())
.getPlan();
@@ -891,6 +950,9 @@ public class PushDownVirtualColumnsIntoOlapScanTest
implements MemoPatternMatchS
@Test
void testOnceUniqueFunction() {
+ ConnectContext connectContext = MemoTestUtils.createConnectContext();
+
connectContext.getSessionVariable().experimentalEnableVirtualSlotForCse = true;
+
LogicalOlapScan olapScan = new
LogicalOlapScan(StatementScopeIdGenerator.newRelationId(),
PlanConstructor.newOlapTable(12345L, "t1", 0));
SlotReference id = (SlotReference) olapScan.getOutput().get(0);
@@ -904,7 +966,7 @@ public class PushDownVirtualColumnsIntoOlapScanTest
implements MemoPatternMatchS
),
olapScan);
- Plan root = PlanChecker.from(MemoTestUtils.createConnectContext(),
filter)
+ Plan root = PlanChecker.from(connectContext, filter)
.applyTopDown(new PushDownVirtualColumnsIntoOlapScan())
.getPlan();
Assertions.assertInstanceOf(LogicalProject.class, root);
@@ -925,6 +987,9 @@ public class PushDownVirtualColumnsIntoOlapScanTest
implements MemoPatternMatchS
@Test
void testMultipleTimesUniqueFunctions() {
+ ConnectContext connectContext = MemoTestUtils.createConnectContext();
+
connectContext.getSessionVariable().experimentalEnableVirtualSlotForCse = true;
+
LogicalOlapScan olapScan = new
LogicalOlapScan(StatementScopeIdGenerator.newRelationId(),
PlanConstructor.newOlapTable(12345L, "t1", 0));
SlotReference id = (SlotReference) olapScan.getOutput().get(0);
@@ -940,7 +1005,7 @@ public class PushDownVirtualColumnsIntoOlapScanTest
implements MemoPatternMatchS
),
olapScan);
- Plan root = PlanChecker.from(MemoTestUtils.createConnectContext(),
filter)
+ Plan root = PlanChecker.from(connectContext, filter)
.applyTopDown(new PushDownVirtualColumnsIntoOlapScan())
.getPlan();
Assertions.assertInstanceOf(LogicalProject.class, root);
@@ -965,6 +1030,7 @@ public class PushDownVirtualColumnsIntoOlapScanTest
implements MemoPatternMatchS
// Test that any expression tree containing lambda anywhere is
completely skipped
ConnectContext connectContext = MemoTestUtils.createConnectContext();
+
connectContext.getSessionVariable().experimentalEnableVirtualSlotForCse = true;
LogicalOlapScan scan = PlanConstructor.newLogicalOlapScan(0, "t1", 0);
SlotReference x = (SlotReference) scan.getOutput().get(0);
SlotReference y = (SlotReference) scan.getOutput().get(1);
@@ -1026,6 +1092,7 @@ public class PushDownVirtualColumnsIntoOlapScanTest
implements MemoPatternMatchS
// Test that lambda-containing expressions in project are also skipped
ConnectContext connectContext = MemoTestUtils.createConnectContext();
+
connectContext.getSessionVariable().experimentalEnableVirtualSlotForCse = true;
LogicalOlapScan scan = PlanConstructor.newLogicalOlapScan(0, "t1", 0);
SlotReference x = (SlotReference) scan.getOutput().get(0);
SlotReference y = (SlotReference) scan.getOutput().get(1);
@@ -1091,6 +1158,7 @@ public class PushDownVirtualColumnsIntoOlapScanTest
implements MemoPatternMatchS
// Test deeply nested expressions containing lambda are completely
skipped
ConnectContext connectContext = MemoTestUtils.createConnectContext();
+
connectContext.getSessionVariable().experimentalEnableVirtualSlotForCse = true;
LogicalOlapScan scan = PlanConstructor.newLogicalOlapScan(0, "t1", 0);
SlotReference x = (SlotReference) scan.getOutput().get(0);
SlotReference y = (SlotReference) scan.getOutput().get(1);
@@ -1157,6 +1225,7 @@ public class PushDownVirtualColumnsIntoOlapScanTest
implements MemoPatternMatchS
// Test comprehensive scenario mixing lambda and non-lambda expressions
ConnectContext connectContext = MemoTestUtils.createConnectContext();
+
connectContext.getSessionVariable().experimentalEnableVirtualSlotForCse = true;
LogicalOlapScan scan = PlanConstructor.newLogicalOlapScan(0, "t1", 0);
SlotReference x = (SlotReference) scan.getOutput().get(0);
SlotReference y = (SlotReference) scan.getOutput().get(1);
diff --git
a/regression-test/suites/nereids_rules_p0/constant_propagation/constant_propagation.groovy
b/regression-test/suites/nereids_rules_p0/constant_propagation/constant_propagation.groovy
index fba1e8acad8..da2648e4c86 100644
---
a/regression-test/suites/nereids_rules_p0/constant_propagation/constant_propagation.groovy
+++
b/regression-test/suites/nereids_rules_p0/constant_propagation/constant_propagation.groovy
@@ -34,6 +34,7 @@ suite('constant_propagation') {
SET ignore_shape_nodes='PhysicalDistribute';
SET runtime_filter_type=2;
set disable_join_reorder=true;
+ SET experimental_enable_virtual_slot_for_cse=true;
"""
sql 'drop table if exists t1 force'
diff --git
a/regression-test/suites/query_p0/sql_functions/json_functions/test_json_function.groovy
b/regression-test/suites/query_p0/sql_functions/json_functions/test_json_function.groovy
index cd265606ee6..eec99e21782 100644
---
a/regression-test/suites/query_p0/sql_functions/json_functions/test_json_function.groovy
+++
b/regression-test/suites/query_p0/sql_functions/json_functions/test_json_function.groovy
@@ -16,6 +16,7 @@
// under the License.
suite("test_json_function", "arrow_flight_sql") {
sql "set batch_size = 4096;"
+ sql "set experimental_enable_virtual_slot_for_cse=true;"
qt_sql "SELECT get_json_double('{\"k1\":1.3, \"k2\":\"2\"}', \"\$.k1\");"
qt_sql "SELECT get_json_double('{\"k1\":\"v1\", \"my.key\":[1.1, 2.2,
3.3]}', '\$.\"my.key\"[1]');"
diff --git
a/regression-test/suites/query_p0/virtual_slot_ref/adjust_virtual_slot_nullable.groovy
b/regression-test/suites/query_p0/virtual_slot_ref/adjust_virtual_slot_nullable.groovy
index e7c24c10740..df2a3087906 100644
---
a/regression-test/suites/query_p0/virtual_slot_ref/adjust_virtual_slot_nullable.groovy
+++
b/regression-test/suites/query_p0/virtual_slot_ref/adjust_virtual_slot_nullable.groovy
@@ -16,6 +16,7 @@
// under the License.
suite("adjust_virtual_slot_nullable") {
+ sql "set experimental_enable_virtual_slot_for_cse=true;"
def tbl1 = "tbl_adjust_virtual_slot_nullable_1"
def tbl2 = "tbl_adjust_virtual_slot_nullable_2"
diff --git
a/regression-test/suites/query_p0/virtual_slot_ref/char_type_shrink_before_project.groovy
b/regression-test/suites/query_p0/virtual_slot_ref/char_type_shrink_before_project.groovy
index e77ccdca79e..67c9c34372a 100644
---
a/regression-test/suites/query_p0/virtual_slot_ref/char_type_shrink_before_project.groovy
+++
b/regression-test/suites/query_p0/virtual_slot_ref/char_type_shrink_before_project.groovy
@@ -16,6 +16,7 @@
// under the License.
suite("char_type_shrink_before_projec") {
+ sql "set experimental_enable_virtual_slot_for_cse=true;"
sql """drop table if exists char_type_shrink_before_projec"""
sql """
CREATE TABLE `char_type_shrink_before_projec` (
diff --git
a/regression-test/suites/query_p0/virtual_slot_ref/expr_with_runtime_return_type.groovy
b/regression-test/suites/query_p0/virtual_slot_ref/expr_with_runtime_return_type.groovy
index 80185475304..054a41efcb3 100644
---
a/regression-test/suites/query_p0/virtual_slot_ref/expr_with_runtime_return_type.groovy
+++
b/regression-test/suites/query_p0/virtual_slot_ref/expr_with_runtime_return_type.groovy
@@ -16,6 +16,7 @@
// under the License.
suite("expr_with_runtime_return_type") {
+ sql "set experimental_enable_virtual_slot_for_cse=true;"
sql """
DROP TABLE IF EXISTS expr_with_runtime_return_type
"""
diff --git
a/regression-test/suites/query_p0/virtual_slot_ref/fix_array_type_and_lambda_func.groovy
b/regression-test/suites/query_p0/virtual_slot_ref/fix_array_type_and_lambda_func.groovy
index 9d8605de2ec..fed783cee6e 100644
---
a/regression-test/suites/query_p0/virtual_slot_ref/fix_array_type_and_lambda_func.groovy
+++
b/regression-test/suites/query_p0/virtual_slot_ref/fix_array_type_and_lambda_func.groovy
@@ -16,6 +16,7 @@
// under the License.
suite("fix_array_type_and_lambda_func") {
+ sql "set experimental_enable_virtual_slot_for_cse=true;"
sql """DROP TABLE IF EXISTS fix_array_type_and_lambda_func"""
sql """
CREATE TABLE
diff --git
a/regression-test/suites/query_p0/virtual_slot_ref/return_in_advance_if_block_is_empty.groovy
b/regression-test/suites/query_p0/virtual_slot_ref/return_in_advance_if_block_is_empty.groovy
index 0b968e381df..6c60a0ac6ee 100644
---
a/regression-test/suites/query_p0/virtual_slot_ref/return_in_advance_if_block_is_empty.groovy
+++
b/regression-test/suites/query_p0/virtual_slot_ref/return_in_advance_if_block_is_empty.groovy
@@ -16,6 +16,7 @@
// under the License.
suite("return_in_advance_if_block_is_empty") {
+ sql "set experimental_enable_virtual_slot_for_cse=true;"
sql """set enable_decimal256 = true """
sql """drop table if exists return_in_advance_if_block_is_empty """
sql """
diff --git
a/regression-test/suites/query_p0/virtual_slot_ref/virtual_slot_ref_basic.groovy
b/regression-test/suites/query_p0/virtual_slot_ref/virtual_slot_ref_basic.groovy
index 49012f03efe..5e6e0b79ba2 100644
---
a/regression-test/suites/query_p0/virtual_slot_ref/virtual_slot_ref_basic.groovy
+++
b/regression-test/suites/query_p0/virtual_slot_ref/virtual_slot_ref_basic.groovy
@@ -16,6 +16,7 @@
// under the License.
suite("virtual_slot_ref_basic") {
+ sql "set experimental_enable_virtual_slot_for_cse=true;"
sql "drop table if exists virtual_slot_ref_basic;"
sql """
CREATE TABLE `virtual_slot_ref_basic` (
diff --git
a/regression-test/suites/shape_check/tpcds_sf100/rf_prune/query8.groovy
b/regression-test/suites/shape_check/tpcds_sf100/rf_prune/query8.groovy
index 98c1c2a9fb5..75356abbb88 100644
--- a/regression-test/suites/shape_check/tpcds_sf100/rf_prune/query8.groovy
+++ b/regression-test/suites/shape_check/tpcds_sf100/rf_prune/query8.groovy
@@ -34,6 +34,7 @@ suite("query8") {
sql 'set runtime_filter_type=8'
sql 'set enable_runtime_filter_prune=true'
sql "set disable_nereids_rules=PRUNE_EMPTY_PARTITION"
+ sql "set experimental_enable_virtual_slot_for_cse=true"
def ds = """select s_store_name
diff --git a/regression-test/suites/shape_check/tpcds_sf100/shape/query8.groovy
b/regression-test/suites/shape_check/tpcds_sf100/shape/query8.groovy
index aaf086736c5..0ef19569ab1 100644
--- a/regression-test/suites/shape_check/tpcds_sf100/shape/query8.groovy
+++ b/regression-test/suites/shape_check/tpcds_sf100/shape/query8.groovy
@@ -34,6 +34,7 @@ suite("query8") {
sql 'set enable_runtime_filter_prune=false'
sql 'set runtime_filter_type=8'
sql "set disable_nereids_rules=PRUNE_EMPTY_PARTITION"
+ sql "set experimental_enable_virtual_slot_for_cse=true"
def ds = """select s_store_name
,sum(ss_net_profit)
diff --git
a/regression-test/suites/shape_check/tpcds_sf1000/bs_downgrade_shape/query8.groovy
b/regression-test/suites/shape_check/tpcds_sf1000/bs_downgrade_shape/query8.groovy
index 4cbbc63ca53..55d957bcc08 100644
---
a/regression-test/suites/shape_check/tpcds_sf1000/bs_downgrade_shape/query8.groovy
+++
b/regression-test/suites/shape_check/tpcds_sf1000/bs_downgrade_shape/query8.groovy
@@ -35,6 +35,7 @@ suite("query8") {
sql 'set runtime_filter_type=8'
sql 'set dump_nereids_memo=false'
sql "set disable_nereids_rules=PRUNE_EMPTY_PARTITION"
+ sql "set experimental_enable_virtual_slot_for_cse=true"
def ds = """select s_store_name
,sum(ss_net_profit)
from store_sales
diff --git a/regression-test/suites/shape_check/tpcds_sf1000/hint/query8.groovy
b/regression-test/suites/shape_check/tpcds_sf1000/hint/query8.groovy
index df46b667dea..8cf5420134f 100644
--- a/regression-test/suites/shape_check/tpcds_sf1000/hint/query8.groovy
+++ b/regression-test/suites/shape_check/tpcds_sf1000/hint/query8.groovy
@@ -35,6 +35,7 @@ suite("query8") {
sql 'set runtime_filter_type=8'
sql 'set dump_nereids_memo=false'
sql "set disable_nereids_rules=PRUNE_EMPTY_PARTITION"
+ sql "set experimental_enable_virtual_slot_for_cse=true"
def ds = """select s_store_name
,sum(ss_net_profit)
diff --git
a/regression-test/suites/shape_check/tpcds_sf1000/shape/query8.groovy
b/regression-test/suites/shape_check/tpcds_sf1000/shape/query8.groovy
index 04481786cb6..cbb6206e241 100644
--- a/regression-test/suites/shape_check/tpcds_sf1000/shape/query8.groovy
+++ b/regression-test/suites/shape_check/tpcds_sf1000/shape/query8.groovy
@@ -35,6 +35,7 @@ suite("query8") {
sql 'set runtime_filter_type=8'
sql 'set dump_nereids_memo=false'
sql "set disable_nereids_rules=PRUNE_EMPTY_PARTITION"
+ sql "set experimental_enable_virtual_slot_for_cse=true"
def ds = """select s_store_name
,sum(ss_net_profit)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]