From 90b49abb1fc3ee9642340261d604efb005a1557a Mon Sep 17 00:00:00 2001 From: xiejiann Date: Thu, 12 Oct 2023 13:28:32 +0800 Subject: [PATCH 1/6] fix 2.0 case error --- .../data/nereids_syntax_p0/join_subquery_to_apply.out | 1 + .../data/nereids_syntax_p0/push_filter_through_ptopn.out | 6 +++--- regression-test/suites/nereids_syntax_p0/advance_mv.groovy | 4 ++-- .../suites/nereids_syntax_p0/bind_priority.groovy | 2 +- regression-test/suites/nereids_syntax_p0/cast.groovy | 2 +- regression-test/suites/nereids_syntax_p0/function.groovy | 2 +- 6 files changed, 9 insertions(+), 8 deletions(-) diff --git a/regression-test/data/nereids_syntax_p0/join_subquery_to_apply.out b/regression-test/data/nereids_syntax_p0/join_subquery_to_apply.out index 9c9c4c6c8a2be1..b097eea8dae3fa 100644 --- a/regression-test/data/nereids_syntax_p0/join_subquery_to_apply.out +++ b/regression-test/data/nereids_syntax_p0/join_subquery_to_apply.out @@ -1,3 +1,4 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !sql -- +zhangsan diff --git a/regression-test/data/nereids_syntax_p0/push_filter_through_ptopn.out b/regression-test/data/nereids_syntax_p0/push_filter_through_ptopn.out index 05343ae859ed66..7f6d7959a6fb1f 100644 --- a/regression-test/data/nereids_syntax_p0/push_filter_through_ptopn.out +++ b/regression-test/data/nereids_syntax_p0/push_filter_through_ptopn.out @@ -32,7 +32,7 @@ PhysicalResultSink -- !3 -- PhysicalResultSink --PhysicalDistribute -----filter((T.b = 2) and (rn <= 2)) +----filter((rn <= 2)(T.b = 2)) ------PhysicalWindow --------PhysicalQuickSort ----------PhysicalPartitionTopN @@ -42,9 +42,9 @@ PhysicalResultSink PhysicalResultSink --PhysicalDistribute ----PhysicalProject -------filter((T.b = 2) and (rn <= 2)) +------filter((rn <= 2)(T.b = 2)) --------PhysicalWindow -----------PhysicalPartitionTopN +----------PhysicalQuickSort ------------PhysicalDistribute --------------PhysicalPartitionTopN ----------------PhysicalProject diff --git a/regression-test/suites/nereids_syntax_p0/advance_mv.groovy b/regression-test/suites/nereids_syntax_p0/advance_mv.groovy index b3aa733c38c055..17ee0e0d041b8e 100644 --- a/regression-test/suites/nereids_syntax_p0/advance_mv.groovy +++ b/regression-test/suites/nereids_syntax_p0/advance_mv.groovy @@ -99,10 +99,10 @@ suite("advance_mv") { createMV("CREATE materialized VIEW mv2 AS SELECT abs(k1)+k2+1 tmp, sum(abs(k2+2)+k3+3) FROM ${tbName2} GROUP BY tmp;") explain { - sql("SELECT abs(k1)+k2+1 tmp, sum(abs(k2+2)+k3+3) from FROM ${tbName2} GROUP BY tmp;") + sql("SELECT abs(k1)+k2+1 tmp, sum(abs(k2+2)+k3+3) FROM ${tbName2} GROUP BY tmp;") contains "(mv2)" } - order_qt_select_star "SELECT abs(k1)+k2+1 tmp, sum(abs(k2+2)+k3+3) from FROM ${tbName2} GROUP BY tmp;" + order_qt_select_star "SELECT abs(k1)+k2+1 tmp, sum(abs(k2+2)+k3+3) FROM ${tbName2} GROUP BY tmp;" sql "CREATE materialized VIEW mv3 AS SELECT abs(k1)+k2+1 tmp, abs(k2+2)+k3+3 FROM ${tbName2};" int max_try_secs2 = 60 diff --git a/regression-test/suites/nereids_syntax_p0/bind_priority.groovy b/regression-test/suites/nereids_syntax_p0/bind_priority.groovy index 19b630854cb855..c9fd6592863551 100644 --- a/regression-test/suites/nereids_syntax_p0/bind_priority.groovy +++ b/regression-test/suites/nereids_syntax_p0/bind_priority.groovy @@ -116,7 +116,7 @@ suite("bind_priority") { test{ sql "SELECT a,2 as a FROM (SELECT '1' as a) b HAVING a=1" - exception "Unexpected exception: a is ambiguous: a#0, a#1." + exception "Column 'a' in field list is ambiguous" } sql "drop table if exists duplicate_slot"; diff --git a/regression-test/suites/nereids_syntax_p0/cast.groovy b/regression-test/suites/nereids_syntax_p0/cast.groovy index 24dc63628d6f7c..44ac8bde63ac2c 100644 --- a/regression-test/suites/nereids_syntax_p0/cast.groovy +++ b/regression-test/suites/nereids_syntax_p0/cast.groovy @@ -191,7 +191,7 @@ suite("cast") { test { sql "select true + 1 + 'x'" - exception "string literal 'x' cannot be cast to double" + exception "No match for vec function '((CAST(TRUE AS BIGINT) + 1) + NULL)' with operand types BIGINT and DOUBLE" } qt_sql_test_DecimalV3_mode """select cast(1 as DECIMALV3(1, 0)) % 2.1;"""; diff --git a/regression-test/suites/nereids_syntax_p0/function.groovy b/regression-test/suites/nereids_syntax_p0/function.groovy index 498273bad91ffd..1efa58160ab34a 100644 --- a/regression-test/suites/nereids_syntax_p0/function.groovy +++ b/regression-test/suites/nereids_syntax_p0/function.groovy @@ -121,7 +121,7 @@ suite("nereids_function") { } test { - sql """select "1" == "123", "%%" == "%%" """ + sql """select "1" = "123", "%%" = "%%" """ result([[false, true]]) } From 1ee1f2faf2e60342933d5b9ce07708c5f0641176 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E5=81=A5?= Date: Thu, 12 Oct 2023 17:57:54 +0800 Subject: [PATCH 2/6] Update bind_priority.groovy --- regression-test/suites/nereids_syntax_p0/bind_priority.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/regression-test/suites/nereids_syntax_p0/bind_priority.groovy b/regression-test/suites/nereids_syntax_p0/bind_priority.groovy index c9fd6592863551..19b630854cb855 100644 --- a/regression-test/suites/nereids_syntax_p0/bind_priority.groovy +++ b/regression-test/suites/nereids_syntax_p0/bind_priority.groovy @@ -116,7 +116,7 @@ suite("bind_priority") { test{ sql "SELECT a,2 as a FROM (SELECT '1' as a) b HAVING a=1" - exception "Column 'a' in field list is ambiguous" + exception "Unexpected exception: a is ambiguous: a#0, a#1." } sql "drop table if exists duplicate_slot"; From 82614bad797e024881c39ccea6c2f37c4cda8c4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E5=81=A5?= Date: Thu, 12 Oct 2023 17:58:26 +0800 Subject: [PATCH 3/6] Update bind_priority.groovy --- regression-test/suites/nereids_syntax_p0/bind_priority.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/regression-test/suites/nereids_syntax_p0/bind_priority.groovy b/regression-test/suites/nereids_syntax_p0/bind_priority.groovy index 19b630854cb855..cce930fdb5e965 100644 --- a/regression-test/suites/nereids_syntax_p0/bind_priority.groovy +++ b/regression-test/suites/nereids_syntax_p0/bind_priority.groovy @@ -53,7 +53,7 @@ suite("bind_priority") { sql """ select sum(a) as v from bind_priority_tbl group by v; """ - exception "Unknown column 'v' in 'table list' in AGGREGATE clause" + exception "Unexpected exception: a is ambiguous: a#0, a#1." } sql "drop table if exists bind_priority_tbl" From 6700292b5fdd5823ae108441e75a4c58827409c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E5=81=A5?= Date: Thu, 12 Oct 2023 18:00:15 +0800 Subject: [PATCH 4/6] Update join_subquery_to_apply.out --- .../data/nereids_syntax_p0/join_subquery_to_apply.out | 1 - 1 file changed, 1 deletion(-) diff --git a/regression-test/data/nereids_syntax_p0/join_subquery_to_apply.out b/regression-test/data/nereids_syntax_p0/join_subquery_to_apply.out index b097eea8dae3fa..9c9c4c6c8a2be1 100644 --- a/regression-test/data/nereids_syntax_p0/join_subquery_to_apply.out +++ b/regression-test/data/nereids_syntax_p0/join_subquery_to_apply.out @@ -1,4 +1,3 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !sql -- -zhangsan From 22fc0a3bae0437457c585f9f453fb81e5f2ca32a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E5=81=A5?= Date: Thu, 12 Oct 2023 18:00:52 +0800 Subject: [PATCH 5/6] Update cast.groovy --- regression-test/suites/nereids_syntax_p0/cast.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/regression-test/suites/nereids_syntax_p0/cast.groovy b/regression-test/suites/nereids_syntax_p0/cast.groovy index 44ac8bde63ac2c..24dc63628d6f7c 100644 --- a/regression-test/suites/nereids_syntax_p0/cast.groovy +++ b/regression-test/suites/nereids_syntax_p0/cast.groovy @@ -191,7 +191,7 @@ suite("cast") { test { sql "select true + 1 + 'x'" - exception "No match for vec function '((CAST(TRUE AS BIGINT) + 1) + NULL)' with operand types BIGINT and DOUBLE" + exception "string literal 'x' cannot be cast to double" } qt_sql_test_DecimalV3_mode """select cast(1 as DECIMALV3(1, 0)) % 2.1;"""; From 202220646bcbf4d0bbaf93a2ccc32e80bd6d5292 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E5=81=A5?= Date: Thu, 12 Oct 2023 18:02:42 +0800 Subject: [PATCH 6/6] Update bind_priority.groovy --- regression-test/suites/nereids_syntax_p0/bind_priority.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/regression-test/suites/nereids_syntax_p0/bind_priority.groovy b/regression-test/suites/nereids_syntax_p0/bind_priority.groovy index cce930fdb5e965..19b630854cb855 100644 --- a/regression-test/suites/nereids_syntax_p0/bind_priority.groovy +++ b/regression-test/suites/nereids_syntax_p0/bind_priority.groovy @@ -53,7 +53,7 @@ suite("bind_priority") { sql """ select sum(a) as v from bind_priority_tbl group by v; """ - exception "Unexpected exception: a is ambiguous: a#0, a#1." + exception "Unknown column 'v' in 'table list' in AGGREGATE clause" } sql "drop table if exists bind_priority_tbl"