This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-2.1 by this push:
     new 87eeddc52c9 branch-2.1: [fix](regress) fix join_condition #50719 
(#50738)
87eeddc52c9 is described below

commit 87eeddc52c9039a2d821921e99250ea26b22dd67
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Fri May 9 22:02:45 2025 +0800

    branch-2.1: [fix](regress) fix join_condition #50719 (#50738)
    
    Cherry-picked from #50719
    
    Co-authored-by: yujun <[email protected]>
---
 .../suites/nereids_syntax_p0/join_condition.groovy | 36 +++++++++----------
 .../suites/nereids_syntax_p0/runtime_filter.groovy | 42 +++++++++++-----------
 2 files changed, 39 insertions(+), 39 deletions(-)

diff --git a/regression-test/suites/nereids_syntax_p0/join_condition.groovy 
b/regression-test/suites/nereids_syntax_p0/join_condition.groovy
index 5a8d20d820a..a708948ff4c 100644
--- a/regression-test/suites/nereids_syntax_p0/join_condition.groovy
+++ b/regression-test/suites/nereids_syntax_p0/join_condition.groovy
@@ -17,51 +17,51 @@
 
 suite("join_condition") {
     multi_sql """
-        drop table if exists 
table_9_undef_partitions2_keys3_properties4_distributed_by5;
-        create table 
table_9_undef_partitions2_keys3_properties4_distributed_by5 (
+        drop table if exists join_condition_table_1111;
+        create table join_condition_table_1111 (
         col_int_undef_signed int/*agg_type_placeholder*/   ,
         col_varchar_10__undef_signed varchar(10)/*agg_type_placeholder*/   ,
         pk int/*agg_type_placeholder*/
         ) engine=olap
         distributed by hash(pk) buckets 10
         properties("replication_num" = "1");
-        insert into 
table_9_undef_partitions2_keys3_properties4_distributed_by5(pk,col_int_undef_signed,col_varchar_10__undef_signed)
 values 
(0,0,null),(1,6,null),(2,9,null),(3,2,''),(4,null,'here'),(5,null,'i'),(6,null,'now'),(7,5,'c'),(8,null,'t');
+        insert into 
join_condition_table_1111(pk,col_int_undef_signed,col_varchar_10__undef_signed) 
values 
(0,0,null),(1,6,null),(2,9,null),(3,2,''),(4,null,'here'),(5,null,'i'),(6,null,'now'),(7,5,'c'),(8,null,'t');
 
-        drop table if exists 
table_100_undef_partitions2_keys3_properties4_distributed_by5;
-        create table 
table_100_undef_partitions2_keys3_properties4_distributed_by5 (
+        drop table if exists join_condition_table_2222;
+        create table join_condition_table_2222 (
         col_int_undef_signed int/*agg_type_placeholder*/   ,
         col_varchar_10__undef_signed varchar(10)/*agg_type_placeholder*/   ,
         pk int/*agg_type_placeholder*/
         ) engine=olap
         distributed by hash(pk) buckets 10
         properties("replication_num" = "1");
-        insert into 
table_100_undef_partitions2_keys3_properties4_distributed_by5(pk,col_int_undef_signed,col_varchar_10__undef_signed)
 values 
(0,null,''),(1,null,''),(2,null,''),(3,0,null),(4,7,null),(5,9,'d'),(6,9,null),(7,null,null),(8,null,null),(9,null,''),(10,null,'are'),(11,null,'were'),(12,2,''),(13,null,'one'),(14,null,'ok'),(15,null,'your'),(16,null,''),(17,null,null),(18,4,''),(19,null,null),(20,null,null),(21,null,null),(22,3,''),(23,null,null),(24,8,''),(25,2,'I''m'),(26,nul
 [...]
+        insert into 
join_condition_table_2222(pk,col_int_undef_signed,col_varchar_10__undef_signed) 
values 
(0,null,''),(1,null,''),(2,null,''),(3,0,null),(4,7,null),(5,9,'d'),(6,9,null),(7,null,null),(8,null,null),(9,null,''),(10,null,'are'),(11,null,'were'),(12,2,''),(13,null,'one'),(14,null,'ok'),(15,null,'your'),(16,null,''),(17,null,null),(18,4,''),(19,null,null),(20,null,null),(21,null,null),(22,3,''),(23,null,null),(24,8,''),(25,2,'I''m'),(26,null,'e'),(27,3,'will'),(28,null,null),
 [...]
 
-        drop table if exists 
table_20_undef_partitions2_keys3_properties4_distributed_by5;
-        create table 
table_20_undef_partitions2_keys3_properties4_distributed_by5 (
+        drop table if exists join_condition_table_3333;
+        create table join_condition_table_3333 (
         col_int_undef_signed int/*agg_type_placeholder*/   ,
         col_varchar_10__undef_signed varchar(10)/*agg_type_placeholder*/   ,
         pk int/*agg_type_placeholder*/
         ) engine=olap
         distributed by hash(pk) buckets 10
         properties("replication_num" = "1");
-        insert into 
table_20_undef_partitions2_keys3_properties4_distributed_by5(pk,col_int_undef_signed,col_varchar_10__undef_signed)
 values 
(0,null,'my'),(1,null,'a'),(2,5,''),(3,0,'that'),(4,0,'want'),(5,null,'g'),(6,null,null),(7,null,''),(8,null,null),(9,3,'b'),(10,null,'her'),(11,6,''),(12,null,'k'),(13,null,'then'),(14,2,null),(15,null,''),(16,null,'g'),(17,null,'x'),(18,null,'d'),(19,null,null);
+        insert into 
join_condition_table_3333(pk,col_int_undef_signed,col_varchar_10__undef_signed) 
values 
(0,null,'my'),(1,null,'a'),(2,5,''),(3,0,'that'),(4,0,'want'),(5,null,'g'),(6,null,null),(7,null,''),(8,null,null),(9,3,'b'),(10,null,'her'),(11,6,''),(12,null,'k'),(13,null,'then'),(14,2,null),(15,null,''),(16,null,'g'),(17,null,'x'),(18,null,'d'),(19,null,null);
 
-        drop table if exists 
table_8_undef_partitions2_keys3_properties4_distributed_by5;
-        create table 
table_8_undef_partitions2_keys3_properties4_distributed_by5 (
+        drop table if exists join_condition_table_4444;
+        create table join_condition_table_4444 (
         col_int_undef_signed int/*agg_type_placeholder*/   ,
         col_varchar_10__undef_signed varchar(10)/*agg_type_placeholder*/   ,
         pk int/*agg_type_placeholder*/
         ) engine=olap
         distributed by hash(pk) buckets 10
         properties("replication_num" = "1");
-        insert into 
table_8_undef_partitions2_keys3_properties4_distributed_by5(pk,col_int_undef_signed,col_varchar_10__undef_signed)
 values 
(0,3,'s'),(1,8,''),(2,null,null),(3,7,'k'),(4,null,'x'),(5,null,''),(6,null,'will'),(7,null,'so');
+        insert into 
join_condition_table_4444(pk,col_int_undef_signed,col_varchar_10__undef_signed) 
values 
(0,3,'s'),(1,8,''),(2,null,null),(3,7,'k'),(4,null,'x'),(5,null,''),(6,null,'will'),(7,null,'so');
         """
 
-    order_qt_join_with_add_min_max_rule """SELECT *  FROM 
table_9_undef_partitions2_keys3_properties4_distributed_by5 AS t1
-            LEFT ANTI JOIN 
table_100_undef_partitions2_keys3_properties4_distributed_by5 AS t2 ON t2 . 
`pk` = 2 OR t2 . `pk` < 0
-            RIGHT ANTI JOIN 
table_9_undef_partitions2_keys3_properties4_distributed_by5 AS alias1 ON alias1 
. `pk` >= 3
-            CROSS JOIN 
table_20_undef_partitions2_keys3_properties4_distributed_by5 AS alias2
-            INNER JOIN 
table_8_undef_partitions2_keys3_properties4_distributed_by5 AS alias3 ;
+    order_qt_join_with_add_min_max_rule """SELECT *  FROM 
join_condition_table_1111 AS t1
+            LEFT ANTI JOIN join_condition_table_2222 AS t2 ON t2 . `pk` = 2 OR 
t2 . `pk` < 0
+            RIGHT ANTI JOIN join_condition_table_1111 AS alias1 ON alias1 . 
`pk` >= 3
+            CROSS JOIN join_condition_table_3333 AS alias2
+            INNER JOIN join_condition_table_4444 AS alias3 ;
             """
-}
\ No newline at end of file
+}
diff --git a/regression-test/suites/nereids_syntax_p0/runtime_filter.groovy 
b/regression-test/suites/nereids_syntax_p0/runtime_filter.groovy
index 9e6ef9bb71c..41ea6967b18 100644
--- a/regression-test/suites/nereids_syntax_p0/runtime_filter.groovy
+++ b/regression-test/suites/nereids_syntax_p0/runtime_filter.groovy
@@ -49,58 +49,58 @@ suite("runtime_filter") {
 
     multi_sql """
 
-    drop table if exists 
table_2_undef_partitions2_keys3_properties4_distributed_by5;
-    create table table_2_undef_partitions2_keys3_properties4_distributed_by5 (
+    drop table if exists runtime_filter_table_1111;
+    create table runtime_filter_table_1111 (
     col_int_undef_signed int/*agg_type_placeholder*/   ,
     col_varchar_10__undef_signed varchar(10)/*agg_type_placeholder*/   ,
     pk int/*agg_type_placeholder*/
     ) engine=olap
     distributed by hash(pk) buckets 10
     properties("replication_num" = "1");
-    insert into 
table_2_undef_partitions2_keys3_properties4_distributed_by5(pk,col_int_undef_signed,col_varchar_10__undef_signed)
 values (0,1,null),(1,7,null);
+    insert into 
runtime_filter_table_1111(pk,col_int_undef_signed,col_varchar_10__undef_signed) 
values (0,1,null),(1,7,null);
 
-    drop table if exists 
table_6_undef_partitions2_keys3_properties4_distributed_by5;
-    create table table_6_undef_partitions2_keys3_properties4_distributed_by5 (
+    drop table if exists runtime_filter_table_2222;
+    create table runtime_filter_table_2222 (
     col_int_undef_signed int/*agg_type_placeholder*/   ,
     col_varchar_10__undef_signed varchar(10)/*agg_type_placeholder*/   ,
     pk int/*agg_type_placeholder*/
     ) engine=olap
     distributed by hash(pk) buckets 10
     properties("replication_num" = "1");
-    insert into 
table_6_undef_partitions2_keys3_properties4_distributed_by5(pk,col_int_undef_signed,col_varchar_10__undef_signed)
 values 
(0,null,'think'),(1,null,''),(2,2,''),(3,null,'r'),(4,null,null),(5,8,'here');
+    insert into 
runtime_filter_table_2222(pk,col_int_undef_signed,col_varchar_10__undef_signed) 
values 
(0,null,'think'),(1,null,''),(2,2,''),(3,null,'r'),(4,null,null),(5,8,'here');
 
 
 
-    drop table if exists 
table_9_undef_partitions2_keys3_properties4_distributed_by5;
-    create table table_9_undef_partitions2_keys3_properties4_distributed_by5 (
+    drop table if exists runtime_filter_table_3333;
+    create table runtime_filter_table_3333 (
     col_int_undef_signed int/*agg_type_placeholder*/   ,
     col_varchar_10__undef_signed varchar(10)/*agg_type_placeholder*/   ,
     pk int/*agg_type_placeholder*/
     ) engine=olap
     distributed by hash(pk) buckets 10
     properties("replication_num" = "1");
-    insert into 
table_9_undef_partitions2_keys3_properties4_distributed_by5(pk,col_int_undef_signed,col_varchar_10__undef_signed)
 values 
(0,0,null),(1,6,null),(2,9,null),(3,2,''),(4,null,'here'),(5,null,'i'),(6,null,'now'),(7,5,'c'),(8,null,'t');
+    insert into 
runtime_filter_table_3333(pk,col_int_undef_signed,col_varchar_10__undef_signed) 
values 
(0,0,null),(1,6,null),(2,9,null),(3,2,''),(4,null,'here'),(5,null,'i'),(6,null,'now'),(7,5,'c'),(8,null,'t');
 
 
-    drop table if exists 
table_20_undef_partitions2_keys3_properties4_distributed_by5;
-    create table table_20_undef_partitions2_keys3_properties4_distributed_by5 (
+    drop table if exists runtime_filter_4444;
+    create table runtime_filter_4444 (
     col_int_undef_signed int/*agg_type_placeholder*/   ,
     col_varchar_10__undef_signed varchar(10)/*agg_type_placeholder*/   ,
     pk int/*agg_type_placeholder*/
     ) engine=olap
     distributed by hash(pk) buckets 10
     properties("replication_num" = "1");
-    insert into 
table_20_undef_partitions2_keys3_properties4_distributed_by5(pk,col_int_undef_signed,col_varchar_10__undef_signed)
 values 
(0,null,'my'),(1,null,'a'),(2,5,''),(3,0,'that'),(4,0,'want'),(5,null,'g'),(6,null,null),(7,null,''),(8,null,null),(9,3,'b'),(10,null,'her'),(11,6,''),(12,null,'k'),(13,null,'then'),(14,2,null),(15,null,''),(16,null,'g'),(17,null,'x'),(18,null,'d'),(19,null,null);
+    insert into 
runtime_filter_4444(pk,col_int_undef_signed,col_varchar_10__undef_signed) 
values 
(0,null,'my'),(1,null,'a'),(2,5,''),(3,0,'that'),(4,0,'want'),(5,null,'g'),(6,null,null),(7,null,''),(8,null,null),(9,3,'b'),(10,null,'her'),(11,6,''),(12,null,'k'),(13,null,'then'),(14,2,null),(15,null,''),(16,null,'g'),(17,null,'x'),(18,null,'d'),(19,null,null);
 
-    drop table if exists 
table_8_undef_partitions2_keys3_properties4_distributed_by5;
-    create table table_8_undef_partitions2_keys3_properties4_distributed_by5 (
+    drop table if exists runtime_filter_table_5555;
+    create table runtime_filter_table_5555 (
     col_int_undef_signed int/*agg_type_placeholder*/   ,
     col_varchar_10__undef_signed varchar(10)/*agg_type_placeholder*/   ,
     pk int/*agg_type_placeholder*/
     ) engine=olap
     distributed by hash(pk) buckets 10
     properties("replication_num" = "1");
-    insert into 
table_8_undef_partitions2_keys3_properties4_distributed_by5(pk,col_int_undef_signed,col_varchar_10__undef_signed)
 values 
(0,3,'s'),(1,8,''),(2,null,null),(3,7,'k'),(4,null,'x'),(5,null,''),(6,null,'will'),(7,null,'so');
+    insert into 
runtime_filter_table_5555(pk,col_int_undef_signed,col_varchar_10__undef_signed) 
values 
(0,3,'s'),(1,8,''),(2,null,null),(3,7,'k'),(4,null,'x'),(5,null,''),(6,null,'will'),(7,null,'so');
 
     """
     //do not push rf inside recursive ctes
@@ -109,12 +109,12 @@ suite("runtime_filter") {
     SELECT
         *
     FROM
-        table_2_undef_partitions2_keys3_properties4_distributed_by5 AS t1 
RIGHT SEMI
-        JOIN table_6_undef_partitions2_keys3_properties4_distributed_by5 AS t2 
ON t1.`pk` + 1 = t2.`pk` + 1
-        LEFT OUTER JOIN 
table_8_undef_partitions2_keys3_properties4_distributed_by5 AS alias1 ON 
t2.`pk` + 5 = alias1.`pk`
+        runtime_filter_table_1111 AS t1 RIGHT SEMI
+        JOIN runtime_filter_table_2222 AS t2 ON t1.`pk` + 1 = t2.`pk` + 1
+        LEFT OUTER JOIN runtime_filter_table_5555 AS alias1 ON t2.`pk` + 5 = 
alias1.`pk`
         OR t2.`pk` + 4 = alias1.`pk` + 1
-        INNER JOIN table_9_undef_partitions2_keys3_properties4_distributed_by5 
AS alias2
-        INNER JOIN 
table_20_undef_partitions2_keys3_properties4_distributed_by5 AS alias3 ON 
alias2.`pk` = alias3.`pk`;    
+        INNER JOIN runtime_filter_table_3333 AS alias2
+        INNER JOIN runtime_filter_4444 AS alias3 ON alias2.`pk` = alias3.`pk`; 
   
      """
 
     // do not generate rf on schemaScan. if rf generated, following sql is 
blocked
@@ -132,4 +132,4 @@ suite("runtime_filter") {
         ORDER BY col.TABLE_SCHEMA,col.TABLE_NAME,col.ORDINAL_POSITION;
     """
 
-}
\ No newline at end of file
+}


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to