diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/analyzer/UnboundAlias.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/analyzer/UnboundAlias.java index 25d40dd5981194..043542eaac6b79 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/analyzer/UnboundAlias.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/analyzer/UnboundAlias.java @@ -36,21 +36,29 @@ */ public class UnboundAlias extends NamedExpression implements UnaryExpression, Unbound, PropagateNullable { - private Optional alias; + private final Optional alias; + private final boolean nameFromChild; public UnboundAlias(Expression child) { - super(ImmutableList.of(child)); - this.alias = Optional.empty(); + this(ImmutableList.of(child), Optional.empty()); } public UnboundAlias(Expression child, String alias) { - super(ImmutableList.of(child)); - this.alias = Optional.of(alias); + this(ImmutableList.of(child), Optional.of(alias)); + } + + public UnboundAlias(Expression child, String alias, boolean nameFromChild) { + this(ImmutableList.of(child), Optional.of(alias), nameFromChild); } private UnboundAlias(List children, Optional alias) { + this(children, alias, false); + } + + private UnboundAlias(List children, Optional alias, boolean nameFromChild) { super(children); this.alias = alias; + this.nameFromChild = nameFromChild; } @Override @@ -89,4 +97,8 @@ public UnboundAlias withChildren(List children) { public Optional getAlias() { return alias; } + + public boolean isNameFromChild() { + return nameFromChild; + } } diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/parser/LogicalPlanBuilder.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/parser/LogicalPlanBuilder.java index 2232f01bb3020b..72f427c5095727 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/parser/LogicalPlanBuilder.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/parser/LogicalPlanBuilder.java @@ -2130,10 +2130,16 @@ public NamedExpression visitNamedExpression(NamedExpressionContext ctx) { if (ctx.identifierOrText() == null) { if (expression instanceof NamedExpression) { return (NamedExpression) expression; - } else if (expression instanceof Literal) { - return new Alias(expression); } else { - return new UnboundAlias(expression); + int start = ctx.expression().start.getStartIndex(); + int stop = ctx.expression().stop.getStopIndex(); + String alias = ctx.start.getInputStream() + .getText(new org.antlr.v4.runtime.misc.Interval(start, stop)); + if (expression instanceof Literal) { + return new Alias(expression, alias, true); + } else { + return new UnboundAlias(expression, alias, true); + } } } String alias = visitIdentifierOrText(ctx.identifierOrText()); diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/ExpressionAnalyzer.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/ExpressionAnalyzer.java index 2a0f7dd9a9e601..05d3804df2b2c5 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/ExpressionAnalyzer.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/ExpressionAnalyzer.java @@ -265,7 +265,7 @@ public static Variable resolveUnboundVariable(UnboundVariable unboundVariable) t public Expression visitUnboundAlias(UnboundAlias unboundAlias, ExpressionRewriteContext context) { Expression child = unboundAlias.child().accept(this, context); if (unboundAlias.getAlias().isPresent()) { - return new Alias(child, unboundAlias.getAlias().get()); + return new Alias(child, unboundAlias.getAlias().get(), unboundAlias.isNameFromChild()); // TODO: the variant bind element_at(slot, 'name') will return a slot, and we should // assign an Alias to this function, this is trick and should refactor it } else if (!(unboundAlias.child() instanceof ElementAt) && child instanceof NamedExpression) { diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/Alias.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/Alias.java index 9ff90b5ac96784..48a98eb3ee1d73 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/Alias.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/Alias.java @@ -48,7 +48,11 @@ public class Alias extends NamedExpression implements UnaryExpression { * @param name alias name */ public Alias(Expression child, String name) { - this(StatementScopeIdGenerator.newExprId(), child, name, false); + this(child, name, false); + } + + public Alias(Expression child, String name, boolean nameFromChild) { + this(StatementScopeIdGenerator.newExprId(), child, name, nameFromChild); } public Alias(Expression child) { diff --git a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/analysis/FillUpMissingSlotsTest.java b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/analysis/FillUpMissingSlotsTest.java index 31b135e7fbb970..aebab8dfc9440c 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/analysis/FillUpMissingSlotsTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/analysis/FillUpMissingSlotsTest.java @@ -240,7 +240,7 @@ public void testHavingAggregateFunction() { ).when(FieldChecker.check("projects", Lists.newArrayList(a1.toSlot(), sumA2.toSlot())))); sql = "SELECT a1, sum(a1 + a2) FROM t1 GROUP BY a1 HAVING sum(a1 + a2) > 0"; - Alias sumA1A2 = new Alias(new ExprId(3), new Sum(new Add(a1, a2)), "sum((a1 + a2))"); + Alias sumA1A2 = new Alias(new ExprId(3), new Sum(new Add(a1, a2)), "sum(a1 + a2)"); PlanChecker.from(connectContext).analyze(sql) .matches( logicalProject( @@ -363,7 +363,7 @@ void testComplexQueryWithHaving() { Alias sumA1 = new Alias(new ExprId(9), new Sum(a1), "sum(a1)"); Alias countA1 = new Alias(new ExprId(13), new Count(a1), "count(a1)"); Alias countA11 = new Alias(new ExprId(10), new Add(countA1.toSlot(), Literal.of((byte) 1)), "(count(a1) + 1)"); - Alias sumA1A2 = new Alias(new ExprId(11), new Sum(new Add(a1, a2)), "sum((a1 + a2))"); + Alias sumA1A2 = new Alias(new ExprId(11), new Sum(new Add(a1, a2)), "sum(a1 + a2)"); Alias v1 = new Alias(new ExprId(12), new Count(a2), "v1"); PlanChecker.from(connectContext).analyze(sql) .matches( @@ -476,7 +476,7 @@ public void testSortAggregateFunction() { ).when(FieldChecker.check("projects", Lists.newArrayList(a1.toSlot(), sumA2.toSlot())))); sql = "SELECT a1, sum(a1 + a2) FROM t1 GROUP BY a1 ORDER BY sum(a1 + a2)"; - Alias sumA1A2 = new Alias(new ExprId(3), new Sum(new Add(a1, a2)), "sum((a1 + a2))"); + Alias sumA1A2 = new Alias(new ExprId(3), new Sum(new Add(a1, a2)), "sum(a1 + a2)"); PlanChecker.from(connectContext).analyze(sql) .matches( logicalSort( @@ -562,7 +562,7 @@ void testComplexQueryWithOrderBy() { Alias sumA1 = new Alias(new ExprId(9), new Sum(a1), "sum(a1)"); Alias countA1 = new Alias(new ExprId(13), new Count(a1), "count(a1)"); Alias countA11 = new Alias(new ExprId(10), new Add(new Count(a1), Literal.of((byte) 1)), "(count(a1) + 1)"); - Alias sumA1A2 = new Alias(new ExprId(11), new Sum(new Add(a1, a2)), "sum((a1 + a2))"); + Alias sumA1A2 = new Alias(new ExprId(11), new Sum(new Add(a1, a2)), "sum(a1 + a2)"); Alias v1 = new Alias(new ExprId(12), new Count(a2), "v1"); PlanChecker.from(connectContext).analyze(sql) .matches(logicalProject(logicalSort(logicalProject(logicalAggregate(logicalProject( diff --git a/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_count_through_join.out b/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_count_through_join.out index a7a0f422ee8d2a..076731ffa2ff77 100644 --- a/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_count_through_join.out +++ b/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_count_through_join.out @@ -91,7 +91,7 @@ PhysicalResultSink -- !groupby_pushdown_having -- PhysicalResultSink ---filter((count(score) > 100)) +--filter((count(t1.score) > 100)) ----hashAgg[GLOBAL] ------hashAgg[LOCAL] --------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() @@ -546,7 +546,7 @@ SyntaxError: -- !with_hint_groupby_pushdown_having -- PhysicalResultSink ---filter((count(score) > 100)) +--filter((count(t1.score) > 100)) ----hashAgg[GLOBAL] ------hashAgg[LOCAL] --------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() diff --git a/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_count_through_join_one_side.out b/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_count_through_join_one_side.out index 251bc580d3279d..10a01a67cc86f8 100644 --- a/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_count_through_join_one_side.out +++ b/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_count_through_join_one_side.out @@ -91,7 +91,7 @@ PhysicalResultSink -- !groupby_pushdown_having -- PhysicalResultSink ---filter((count(score) > 100)) +--filter((count(t1.score) > 100)) ----hashAgg[GLOBAL] ------hashAgg[LOCAL] --------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() @@ -572,7 +572,7 @@ SyntaxError: -- !with_hint_groupby_pushdown_having -- PhysicalResultSink ---filter((count(score) > 100)) +--filter((count(t1.score) > 100)) ----hashAgg[GLOBAL] ------hashAgg[LOCAL] --------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() diff --git a/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_min_through_join.out b/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_min_through_join.out index e435bcd4efd335..61477d208e01b1 100644 --- a/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_min_through_join.out +++ b/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_min_through_join.out @@ -91,7 +91,7 @@ PhysicalResultSink -- !groupby_pushdown_having -- PhysicalResultSink ---filter((min(score) > 100)) +--filter((min(t1.score) > 100)) ----hashAgg[GLOBAL] ------hashAgg[LOCAL] --------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() @@ -376,7 +376,7 @@ SyntaxError: -- !with_hint_groupby_pushdown_having -- PhysicalResultSink ---filter((min(score) > 100)) +--filter((min(t1.score) > 100)) ----hashAgg[GLOBAL] ------hashAgg[LOCAL] --------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() diff --git a/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_sum_through_join.out b/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_sum_through_join.out index 9d20fb8b02dd52..e933630ef70723 100644 --- a/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_sum_through_join.out +++ b/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_sum_through_join.out @@ -91,7 +91,7 @@ PhysicalResultSink -- !groupby_pushdown_having -- PhysicalResultSink ---filter((sum(score) > 100)) +--filter((sum(t1.score) > 100)) ----hashAgg[GLOBAL] ------hashAgg[LOCAL] --------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() @@ -366,7 +366,7 @@ SyntaxError: -- !with_hint_groupby_pushdown_having -- PhysicalResultSink ---filter((sum(score) > 100)) +--filter((sum(t1.score) > 100)) ----hashAgg[GLOBAL] ------hashAgg[LOCAL] --------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() diff --git a/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_sum_through_join_one_side.out b/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_sum_through_join_one_side.out index 3a945f58e29e3c..dac25c75b50fe9 100644 --- a/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_sum_through_join_one_side.out +++ b/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_sum_through_join_one_side.out @@ -91,7 +91,7 @@ PhysicalResultSink -- !groupby_pushdown_having -- PhysicalResultSink ---filter((sum(score) > 100)) +--filter((sum(t1.score) > 100)) ----hashAgg[GLOBAL] ------hashAgg[LOCAL] --------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() @@ -392,7 +392,7 @@ SyntaxError: -- !with_hint_groupby_pushdown_having -- PhysicalResultSink ---filter((sum(score) > 100)) +--filter((sum(t1.score) > 100)) ----hashAgg[GLOBAL] ------hashAgg[LOCAL] --------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() diff --git a/regression-test/data/nereids_rules_p0/filter_push_down/push_filter_through.out b/regression-test/data/nereids_rules_p0/filter_push_down/push_filter_through.out index a9f9442ee62559..dd2e37e2926d0a 100644 --- a/regression-test/data/nereids_rules_p0/filter_push_down/push_filter_through.out +++ b/regression-test/data/nereids_rules_p0/filter_push_down/push_filter_through.out @@ -221,7 +221,7 @@ PhysicalResultSink -- !filter_aggregation_filtered_agg_func -- PhysicalResultSink ---filter((count(*) > 10)) +--filter((count() > 10)) ----hashAgg[GLOBAL] ------hashAgg[LOCAL] --------PhysicalOlapScan[t1] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query54.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query54.out index de4dbe32cd1f80..138c011bf4a281 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query54.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query54.out @@ -11,9 +11,9 @@ PhysicalResultSink ----------------PhysicalProject ------------------hashAgg[LOCAL] --------------------PhysicalProject -----------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) <= (d_month_seq + 3)) +----------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) <= d_month_seq+3) ------------------------PhysicalProject ---------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) >= (d_month_seq + 1)) +--------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) >= d_month_seq+1) ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() --------------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query54.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query54.out index 96d57c63e6f62b..fe1b97d49f24cb 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query54.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query54.out @@ -11,9 +11,9 @@ PhysicalResultSink ----------------PhysicalProject ------------------hashAgg[LOCAL] --------------------PhysicalProject -----------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) <= (d_month_seq + 3)) +----------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) <= d_month_seq+3) ------------------------PhysicalProject ---------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) >= (d_month_seq + 1)) +--------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) >= d_month_seq+1) ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[ss_sold_date_sk] --------------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query54.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query54.out index ca44d791dc42aa..e382a96f81affc 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query54.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query54.out @@ -13,9 +13,9 @@ PhysicalResultSink --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) <= (d_month_seq + 3)) +--------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) <= d_month_seq+3) ----------------------------PhysicalProject -------------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) >= (d_month_seq + 1)) +------------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) >= d_month_seq+1) --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() ------------------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query54.out b/regression-test/data/shape_check/tpcds_sf100/shape/query54.out index c2d65d63990fae..5d85bf3be8e726 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query54.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query54.out @@ -13,9 +13,9 @@ PhysicalResultSink --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) <= (d_month_seq + 3)) +--------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) <= d_month_seq+3) ----------------------------PhysicalProject -------------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) >= (d_month_seq + 1)) +------------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) >= d_month_seq+1) --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query54.out b/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query54.out index 397a41b34c4e60..de5048e91202d9 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query54.out +++ b/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query54.out @@ -13,9 +13,9 @@ PhysicalResultSink --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) <= (d_month_seq + 3)) +--------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) <= d_month_seq+3) ----------------------------PhysicalProject -------------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) >= (d_month_seq + 1)) +------------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) >= d_month_seq+1) --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query54.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query54.out index 04bebe19768344..5d2c155f7e86a7 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query54.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query54.out @@ -13,9 +13,9 @@ PhysicalResultSink --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) <= (d_month_seq + 3)) +--------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) <= d_month_seq+3) ----------------------------PhysicalProject -------------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) >= (d_month_seq + 1)) +------------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) >= d_month_seq+1) --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query54.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query54.out index 397a41b34c4e60..de5048e91202d9 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query54.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query54.out @@ -13,9 +13,9 @@ PhysicalResultSink --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) <= (d_month_seq + 3)) +--------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) <= d_month_seq+3) ----------------------------PhysicalProject -------------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) >= (d_month_seq + 1)) +------------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) >= d_month_seq+1) --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query54.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query54.out index 4ee5ff3b075462..e5be80576e23ac 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query54.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query54.out @@ -13,9 +13,9 @@ PhysicalResultSink --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) <= (d_month_seq + 3)) +--------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) <= d_month_seq+3) ----------------------------PhysicalProject -------------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) >= (d_month_seq + 1)) +------------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) >= d_month_seq+1) --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject diff --git a/regression-test/suites/nereids_p0/subquery/test_duplicate_name_in_view.groovy b/regression-test/suites/nereids_p0/subquery/test_duplicate_name_in_view.groovy index c5d2c219527641..775636aba173d8 100644 --- a/regression-test/suites/nereids_p0/subquery/test_duplicate_name_in_view.groovy +++ b/regression-test/suites/nereids_p0/subquery/test_duplicate_name_in_view.groovy @@ -77,7 +77,7 @@ suite("test_duplicate_name_in_view") { issue_19611_t1.c0 + 1 FROM issue_19611_t1 ) tmp; """ - exception "Duplicated inline view column alias: '(c0 + 1)' in inline view: 'tmp'" + exception "Duplicated inline view column alias: 'issue_19611_t1.c0 + 1' in inline view: 'tmp'" } test { diff --git a/regression-test/suites/nereids_syntax_p0/select_const.groovy b/regression-test/suites/nereids_syntax_p0/select_const.groovy index e802fbcca78b4a..d65e9cb6ac282f 100644 --- a/regression-test/suites/nereids_syntax_p0/select_const.groovy +++ b/regression-test/suites/nereids_syntax_p0/select_const.groovy @@ -49,4 +49,6 @@ suite("select_with_const") { """ sql "select all 1" + + sql "select `1 + 2` from (select 1 + 2) t" }