Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file.
11 changes: 11 additions & 0 deletions regression-test/suites/join/ddl/left_outer_left_table.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
CREATE TABLE left_outer_left_table (
`k1` varchar(200) NULL COMMENT ""
) ENGINE=OLAP
UNIQUE KEY(`k1`)
COMMENT "olap"
DISTRIBUTED BY HASH(`k1`) BUCKETS 20
PROPERTIES (
"in_memory" = "false",
"storage_format" = "V2",
"replication_num" = "1"
);
11 changes: 11 additions & 0 deletions regression-test/suites/join/ddl/left_outer_right_table.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
CREATE TABLE left_outer_right_table (
`k2` varchar(100) NULL COMMENT ""
) ENGINE=OLAP
UNIQUE KEY(`k2`)
COMMENT "olap"
DISTRIBUTED BY HASH(`k2`) BUCKETS 20
PROPERTIES (
"in_memory" = "false",
"storage_format" = "V2",
"replication_num" = "1"
);
9 changes: 9 additions & 0 deletions regression-test/suites/join/left_outer_join_explain.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
suite("explain_action", "demo") {
explain {
sql("select k2 from left_outer_left_table a left outer join left_outer_right_table b on b.k2 = a.k1 where a.k1='uuid'")

// contains("OUTPUT EXPRS:<slot 0> 100\n") && contains("PARTITION: UNPARTITIONED\n")
contains "OUTPUT EXPRS:<slot 0> 100\n"
contains "PARTITION: UNPARTITIONED\n"
}
}
32 changes: 32 additions & 0 deletions regression-test/suites/join/load.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// 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.

// The cases is copied from https://github.com/trinodb/trino/tree/master
// /testing/trino-product-tests/src/main/resources/sql-tests/testcases
// and modified by Doris.

suite("load") {
def tables=["left_outer_right_table", "left_outer_left_table"]

for (String table in tables) {
sql """ DROP TABLE IF EXISTS $table """
}

for (String table in tables) {
sql new File("""${context.file.parent}/ddl/${table}.sql""").text
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
explain select k2 from left_outer_left_table a left outer join left_outer_right_table b on b.k2 = a.k1 where a.k1='uuid'