This is an automated email from the ASF dual-hosted git repository. yiguolei 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 97cb095010 [test](join)add test join case4 #12508 97cb095010 is described below commit 97cb0950101d792b397a0b156e449165017a0953 Author: zy-kkk <zhong...@qq.com> AuthorDate: Tue Sep 13 09:09:49 2022 +0800 [test](join)add test join case4 #12508 --- regression-test/data/query/join/test_join4.out | 58 +++++++++++++++++++++ .../suites/query/join/test_join4.groovy | 59 ++++++++++++++++++++++ 2 files changed, 117 insertions(+) diff --git a/regression-test/data/query/join/test_join4.out b/regression-test/data/query/join/test_join4.out new file mode 100644 index 0000000000..a332202a4b --- /dev/null +++ b/regression-test/data/query/join/test_join4.out @@ -0,0 +1,58 @@ +-- This file is automatically generated. You should know what you did if you want to edit this +-- !join1 -- +1 11 1 111 +2 22 2 222 +3 \N \N \N +4 44 4 \N +5 \N \N \N + +-- !join2 -- +1 11 1 111 +2 22 2 222 +3 \N 3 333 +4 44 \N \N +5 \N \N \N + +-- !join3 -- +1 11 1 111 1 11 +2 22 2 222 2 22 +3 \N 3 333 3 \N +4 44 4 \N 4 44 +5 \N \N \N 5 \N + +-- !join4 -- +1 11 1 111 1 11 +2 22 2 222 2 22 +3 \N 3 333 \N \N +4 44 4 \N 4 44 +5 \N \N \N \N \N + +-- !join5 -- +1 11 1 111 1 11 +2 22 2 222 2 22 +3 \N 3 333 3 \N +4 44 4 \N \N \N +5 \N \N \N \N \N + +-- !join6 -- +1 11 1 111 1 11 +2 22 2 222 2 22 +3 \N 3 333 \N \N +4 44 4 \N 4 44 +5 \N \N \N \N \N + +-- !join7 -- +1 11 1 111 1 11 +2 22 2 222 2 22 +4 44 4 \N 4 44 + +-- !join8 -- +1 11 1 111 1 11 +2 22 2 222 2 22 +3 \N 3 333 3 \N + +-- !join9 -- +1 11 1 111 1 11 +2 22 2 222 2 22 +4 44 4 \N 4 44 + diff --git a/regression-test/suites/query/join/test_join4.groovy b/regression-test/suites/query/join/test_join4.groovy new file mode 100644 index 0000000000..41838d554f --- /dev/null +++ b/regression-test/suites/query/join/test_join4.groovy @@ -0,0 +1,59 @@ + // 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_join4", "query,p0") { + def DBname = "test_join4" + sql "DROP DATABASE IF EXISTS ${DBname}" + sql "CREATE DATABASE IF NOT EXISTS ${DBname}" + sql "use ${DBname}" + + def tbName1 = "x" + def tbName2 = "y" + + sql "DROP TABLE IF EXISTS ${tbName1};" + sql "DROP TABLE IF EXISTS ${tbName2};" + + sql """create table ${tbName1} (x1 int, x2 int) DISTRIBUTED BY HASH(x1) properties("replication_num" = "1");""" + sql """create table ${tbName2} (y1 int, y2 int) DISTRIBUTED BY HASH(y1) properties("replication_num" = "1");""" + + sql "insert into ${tbName1} values (1,11);" + sql "insert into ${tbName1} values (2,22);" + sql "insert into ${tbName1} values (3,null);" + sql "insert into ${tbName1} values (4,44);" + sql "insert into ${tbName1} values (5,null);" + + sql "insert into ${tbName2} values (1,111);" + sql "insert into ${tbName2} values (2,222);" + sql "insert into ${tbName2} values (3,333);" + sql "insert into ${tbName2} values (4,null);" + + qt_join1 "select * from ${tbName1} left join ${tbName2} on (x1 = y1 and x2 is not null) order by 1,2,3,4;" + qt_join2 "select * from ${tbName1} left join ${tbName2} on (x1 = y1 and y2 is not null) order by 1,2,3,4;" + + qt_join3 "select * from (select * from ${tbName1} left join y on (x1 = y1)) a left join ${tbName1} x on (a.x1 = x.x1) order by 1,2,3,4,5,6;" + qt_join4 "select * from (select * from ${tbName1} left join y on (x1 = y1)) a left join ${tbName1} x on (a.x1 = x.x1 and a.x2 is not null) order by 1,2,3,4,5,6;" + qt_join5 "select * from (select * from ${tbName1} left join y on (x1 = y1)) a left join ${tbName1} x on (a.x1 = x.x1 and a.y2 is not null) order by 1,2,3,4,5,6;" + qt_join6 "select * from (select * from ${tbName1} left join y on (x1 = y1)) a left join ${tbName1} x on (a.x1 = x.x1 and a.x2 is not null) order by 1,2,3,4,5,6;" + + qt_join7 "select * from (select * from ${tbName1} left join ${tbName2} on (x1 = y1)) a left join ${tbName1} x on (a.x1 = x.x1) where (a.x2 is not null) order by 1,2,3,4,5,6;" + qt_join8 "select * from (select * from ${tbName1} left join ${tbName2} on (x1 = y1)) a left join ${tbName1} x on (a.x1 = x.x1) where (a.y2 is not null) order by 1,2,3,4,5,6;" + qt_join9 "select * from (select * from ${tbName1} left join ${tbName2} on (x1 = y1)) a left join ${tbName1} x on (a.x1 = x.x1) where (a.x2 is not null) order by 1,2,3,4,5,6;" + + sql "DROP TABLE IF EXISTS ${tbName1};" + sql "DROP TABLE IF EXISTS ${tbName2};" + sql "DROP DATABASE IF EXISTS ${DBname};" +} \ No newline at end of file --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org