You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2023/06/12 10:26:31 UTC

[doris] branch master updated: [test](regression) Add cases to test join condition push and not like (#20453)

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

morrysnow 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 c25c19bddc [test](regression) Add cases to test join condition push and not like (#20453)
c25c19bddc is described below

commit c25c19bddc8561ae37638ba294ea2cb9f8cacb00
Author: LiBinfeng <46...@users.noreply.github.com>
AuthorDate: Mon Jun 12 18:26:23 2023 +0800

    [test](regression) Add cases to test join condition push and not like (#20453)
    
    Add testing cases to issue #19613
---
 .../data/nereids_p0/join/test_outer_join.out       | 10 ++++
 .../suites/nereids_p0/join/test_outer_join.groovy  | 61 ++++++++++++++++++++++
 2 files changed, 71 insertions(+)

diff --git a/regression-test/data/nereids_p0/join/test_outer_join.out b/regression-test/data/nereids_p0/join/test_outer_join.out
new file mode 100644
index 0000000000..8dbe8a12c8
--- /dev/null
+++ b/regression-test/data/nereids_p0/join/test_outer_join.out
@@ -0,0 +1,10 @@
+-- !join --
+\N	0.113
+\N	0.477
+\N	0.886
+
+-- !join --
+
+-- !join --
+
+-- !join --
diff --git a/regression-test/suites/nereids_p0/join/test_outer_join.groovy b/regression-test/suites/nereids_p0/join/test_outer_join.groovy
new file mode 100644
index 0000000000..3dc132d08e
--- /dev/null
+++ b/regression-test/suites/nereids_p0/join/test_outer_join.groovy
@@ -0,0 +1,61 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+suite("test_outer_join", "nereids_p0") {
+    sql "SET enable_nereids_planner=true"
+    sql "SET enable_fallback_to_original_planner=false"
+    def tbl1 = "test_outer_join1"
+    def tbl2 = "test_outer_join2"
+
+    sql "DROP TABLE IF EXISTS ${tbl1}"
+    sql """
+            CREATE TABLE IF NOT EXISTS ${tbl1} (
+                c0 DECIMALV3(8,3)
+            ) 
+            DISTRIBUTED BY HASH (c0) BUCKETS 1 PROPERTIES ("replication_num" = "1");
+        """
+
+    sql "DROP TABLE IF EXISTS ${tbl2}"
+    sql """
+            CREATE TABLE IF NOT EXISTS ${tbl2} (
+                c0 CHAR(249)
+            ) AGGREGATE KEY(c0) 
+            DISTRIBUTED BY RANDOM BUCKETS 30 
+            PROPERTIES ("replication_num" = "1");
+        """
+    sql """INSERT INTO ${tbl2} (c0) VALUES ('dr'), ('x7Tq'), ('');"""
+    sql """INSERT INTO ${tbl1} (c0) VALUES (0.47683432698249817), (0.8864791393280029);"""
+    sql """INSERT INTO ${tbl1} (c0) VALUES (0.11287713050842285);"""
+    sql """INSERT INTO ${tbl2} (c0) VALUES ('');"""
+    sql """INSERT INTO ${tbl2} (c0) VALUES ('');"""
+    sql """INSERT INTO ${tbl2} (c0) VALUES ('hb');"""
+
+    qt_join """
+            SELECT * FROM  ${tbl2} RIGHT  OUTER JOIN ${tbl1} ON (('') like ('15DScmSM')) WHERE ('abc' LIKE 'abc') ORDER BY 2;    
+    """
+    qt_join """
+            SELECT * FROM  ${tbl2} RIGHT  OUTER JOIN ${tbl1} ON (('') like ('15DScmSM')) WHERE ('abc' NOT LIKE 'abc');
+    """
+    qt_join """
+            SELECT * FROM  ${tbl2} JOIN ${tbl1} ON (('') like ('15DScmSM')) WHERE ('abc' NOT LIKE 'abc');
+    """
+    qt_join """
+            SELECT * FROM  ${tbl2} LEFT  OUTER JOIN ${tbl1} ON (('') like ('15DScmSM')) WHERE ('abc' NOT LIKE 'abc');    
+    """
+    sql "DROP TABLE IF EXISTS ${tbl1}"
+    sql "DROP TABLE IF EXISTS ${tbl2}"
+}


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org