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 0203b36cc4 [regressiontest](test_with)add with_case test (#12814) 0203b36cc4 is described below commit 0203b36cc48da5e49f0956490f03c3c019780e39 Author: Liqf <109049295+lemonlit...@users.noreply.github.com> AuthorDate: Fri Sep 23 09:10:33 2022 +0800 [regressiontest](test_with)add with_case test (#12814) --- regression-test/data/query_p0/with/test_with.out | 13 +++++++++++ .../suites/query_p0/with/test_with.groovy | 26 ++++++++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/regression-test/data/query_p0/with/test_with.out b/regression-test/data/query_p0/with/test_with.out index fc5c32bfbf..cd4b476602 100644 --- a/regression-test/data/query_p0/with/test_with.out +++ b/regression-test/data/query_p0/with/test_with.out @@ -17,3 +17,16 @@ 1 1 +-- !select -- +1 2 1 2 + +-- !select -- +1 +2 +3 + +-- !select -- +1 +2 +3 + diff --git a/regression-test/suites/query_p0/with/test_with.groovy b/regression-test/suites/query_p0/with/test_with.groovy index 76b064eede..9515f9d3d0 100644 --- a/regression-test/suites/query_p0/with/test_with.groovy +++ b/regression-test/suites/query_p0/with/test_with.groovy @@ -17,8 +17,34 @@ suite("test_with") { sql "use test_query_db" + //Basic WITH qt_select """ select 1 from (with w as (select 1 from baseall where exists (select 1 from baseall)) select 1 from w ) tt """ + qt_select """ + WITH q1(x,y) AS (SELECT 1,2) + SELECT * FROM q1, q1 AS q2; + """ + + qt_select """ + WITH outermost(x) AS ( + SELECT 1 + UNION (WITH innermost as (SELECT 2) + SELECT * FROM innermost + UNION SELECT 3) + ) + SELECT x FROM outermost order by 1; + """ + qt_select """ + WITH outermost(x) AS ( + SELECT 1 + UNION (WITH innermost as (SELECT 2) + SELECT * FROM innermost + UNION SELECT 3) + ) + SELECT * FROM outermost ORDER BY 1; + """ + + } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org