You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2023/04/09 10:15:45 UTC
[doris] branch master updated: [regression](join)Add subquery join case to regression test #17865
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 8d4a7325a9 [regression](join)Add subquery join case to regression test #17865
8d4a7325a9 is described below
commit 8d4a7325a9874a890285d0e72776f4dedb8e816d
Author: caoliang-web <71...@users.noreply.github.com>
AuthorDate: Sun Apr 9 18:15:37 2023 +0800
[regression](join)Add subquery join case to regression test #17865
---
.../data/query_p0/join/test_left_join_with.out | 4 ++
.../query_p0/join/test_left_join_with.groovy | 50 ++++++++++++++++++++++
2 files changed, 54 insertions(+)
diff --git a/regression-test/data/query_p0/join/test_left_join_with.out b/regression-test/data/query_p0/join/test_left_join_with.out
new file mode 100644
index 0000000000..a2c44d41b5
--- /dev/null
+++ b/regression-test/data/query_p0/join/test_left_join_with.out
@@ -0,0 +1,4 @@
+-- This file is automatically generated. You should know what you did if you want to edit this
+-- !select --
+1 a 10
+
diff --git a/regression-test/suites/query_p0/join/test_left_join_with.groovy b/regression-test/suites/query_p0/join/test_left_join_with.groovy
new file mode 100644
index 0000000000..5b3019773f
--- /dev/null
+++ b/regression-test/suites/query_p0/join/test_left_join_with.groovy
@@ -0,0 +1,50 @@
+// 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_left_join_with", "query") {
+
+ def tbName = "test_insert"
+
+ sql """
+ CREATE TABLE IF NOT EXISTS ${tbName} (
+ `id` varchar(11) NULL COMMENT '唯一标识',
+ `name` varchar(10) NULL COMMENT '采集时间',
+ `age` int(11) NULL
+ ) ENGINE=OLAP
+ UNIQUE KEY(`id`)
+ COMMENT 'test'
+ DISTRIBUTED BY HASH(`id`) BUCKETS 10
+ PROPERTIES (
+ "replication_allocation" = "tag.location.default: 1",
+ "in_memory" = "false",
+ "storage_format" = "V2",
+ "light_schema_change" = "true",
+ "disable_auto_compaction" = "false"
+ );
+ """
+
+ sql """insert into ${tbName} values (1,'a',10),(2,'b',20),(3,'c',30);"""
+
+ qt_select """
+ with t1 as (select 1 id)
+ select a.id,a.name,a.age
+ from ${tbName} a
+ join (select id from ${tbName} where id = (select * from t1)) b on a.id = b.id
+ ;
+ """
+
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org