This is an automated email from the ASF dual-hosted git repository.
morrysnow 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 f2ed0dd8299 [WIP](test) remove enable_nereids_planner in regression
cases (part 4) (#34642)
f2ed0dd8299 is described below
commit f2ed0dd8299c5a9cc48241973d7c0cbca5e1ccfa
Author: morrySnow <[email protected]>
AuthorDate: Mon May 13 15:12:12 2024 +0800
[WIP](test) remove enable_nereids_planner in regression cases (part 4)
(#34642)
before PR are
#34417
#34490
#34558
---
.../correctness_p0/test_group_having_alias.out | 2 -
.../test_array_functions_array_intersect_sort.out | 110 ++-------------------
.../data/javaudf_p0/test_javaudf_with_decimal.out | 8 +-
.../suites/correctness_p0/test_cast_decimal.groovy | 14 ---
.../correctness_p0/test_group_having_alias.groovy | 20 ----
...est_array_functions_array_intersect_sort.groovy | 97 +++---------------
...l_tvf_with_complex_type_insertinto_doris.groovy | 1 -
.../tvf/test_tvf_view_count_p2.groovy | 16 +--
.../javaudf_p0/test_javaudf_with_decimal.groovy | 37 +------
...st_array_with_single_row_max_than_uint16.groovy | 1 -
10 files changed, 32 insertions(+), 274 deletions(-)
diff --git a/regression-test/data/correctness_p0/test_group_having_alias.out
b/regression-test/data/correctness_p0/test_group_having_alias.out
index 727040875a7..0b711d92ad6 100644
--- a/regression-test/data/correctness_p0/test_group_having_alias.out
+++ b/regression-test/data/correctness_p0/test_group_having_alias.out
@@ -10,8 +10,6 @@
202245
202245
--- !sql --
-
-- !sql --
202245 3
diff --git
a/regression-test/data/datatype_p0/nested_types/query/array_functions/test_array_functions_array_intersect_sort.out
b/regression-test/data/datatype_p0/nested_types/query/array_functions/test_array_functions_array_intersect_sort.out
index 0127b7b25db..0ede6c3b7a2 100644
---
a/regression-test/data/datatype_p0/nested_types/query/array_functions/test_array_functions_array_intersect_sort.out
+++
b/regression-test/data/datatype_p0/nested_types/query/array_functions/test_array_functions_array_intersect_sort.out
@@ -1,109 +1,43 @@
-- This file is automatically generated. You should know what you did if you
want to edit this
--- !oLd_sql --
+-- !nereid_sql --
array_intersect-array-sort
--- !old_sql --
-[1, 2]
-[1, 2]
-[1]
-[]
-
--- !old_sql --
-[]
-[]
-[]
-[]
-
--- !old_sql --
-[]
-[]
-[]
-[]
-
--- !old_sql --
-[1, 2]
-[1, 2]
-[1]
-[]
-
--- !old_sql --
-[1, 2]
-[1, 2]
-[1, 2]
-[1, 2]
-
--- !old_sql --
-[]
-[]
-[]
-[]
-
--- !old_sql --
+-- !nereid_sql --
[1, 2]
[1, 2]
[1]
[]
--- !old_sql --
+-- !nereid_sql --
[]
[]
[]
[]
--- !old_sql --
+-- !nereid_sql --
[]
[]
[]
[]
--- !old_sql --
+-- !nereid_sql --
[1, 2]
[1, 2]
[1]
[]
--- !old_sql --
+-- !nereid_sql --
[1, 2]
[1, 2]
[1, 2]
[1, 2]
--- !old_sql --
-[]
-[]
-[]
-[]
-
--- !old_sql --
-[]
-
--- !old_sql --
-[]
-
--- !old_sql --
-["a"]
-
--- !old_sql --
+-- !nereid_sql --
[]
-
--- !old_sql --
-[1]
-
--- !old_sql --
[]
-
--- !old_sql --
-[2]
-
--- !old_sql --
[]
-
--- !old_sql --
[]
--- !nereid_sql --
-array_intersect-array-sort
-
-- !nereid_sql --
[1, 2]
[1, 2]
@@ -141,53 +75,29 @@ array_intersect-array-sort
[]
-- !nereid_sql --
-[1, 2]
-[1, 2]
-[1]
[]
-- !nereid_sql --
[]
-[]
-[]
-[]
-- !nereid_sql --
-[]
-[]
-[]
-[]
+["a"]
-- !nereid_sql --
-[1, 2]
-[1, 2]
-[1]
[]
-- !nereid_sql --
-[1, 2]
-[1, 2]
-[1, 2]
-[1, 2]
+[1]
-- !nereid_sql --
[]
-[]
-[]
-[]
-- !nereid_sql --
-[]
+[2]
-- !nereid_sql --
[]
--- !nereid_sql --
-["a"]
-
-- !nereid_sql --
[]
--- !nereid_sql --
-[1]
-
diff --git a/regression-test/data/javaudf_p0/test_javaudf_with_decimal.out
b/regression-test/data/javaudf_p0/test_javaudf_with_decimal.out
index 4a05a63689f..abcbe67e12c 100644
--- a/regression-test/data/javaudf_p0/test_javaudf_with_decimal.out
+++ b/regression-test/data/javaudf_p0/test_javaudf_with_decimal.out
@@ -1,13 +1,9 @@
-- This file is automatically generated. You should know what you did if you
want to edit this
--- !select_1 --
+-- !getarrscale --
[1.123, 1.123] 3
[2.123, 2.123] 3
--- !select_2 --
-{1.123:1.123457} 9
-{2.123:2.123457} 9
-
--- !select_3 --
+-- !retscale --
1 {1.0000000000:1.1110000000}
2 {2.0000000000:2.2220000000}
diff --git a/regression-test/suites/correctness_p0/test_cast_decimal.groovy
b/regression-test/suites/correctness_p0/test_cast_decimal.groovy
index 21a1ab6d0c3..ec9a8434c46 100644
--- a/regression-test/suites/correctness_p0/test_cast_decimal.groovy
+++ b/regression-test/suites/correctness_p0/test_cast_decimal.groovy
@@ -16,20 +16,6 @@
// under the License.
suite("test_cast_decimal") {
- sql """
- set enable_nereids_planner=true;
- """
-
- explain {
- sql """select cast(32123.34212456734 as decimal(3,2));"""
- contains "cast(32123.34212456734 as DECIMALV3(3, 2))"
- }
-
-
- sql """
- set enable_nereids_planner=false;
- """
-
explain {
sql """select cast(32123.34212456734 as decimal(3,2));"""
contains "CAST(32123.34212456734 AS DECIMALV3(3, 2))"
diff --git
a/regression-test/suites/correctness_p0/test_group_having_alias.groovy
b/regression-test/suites/correctness_p0/test_group_having_alias.groovy
index 43f5abf4fcb..7712e9ff203 100644
--- a/regression-test/suites/correctness_p0/test_group_having_alias.groovy
+++ b/regression-test/suites/correctness_p0/test_group_having_alias.groovy
@@ -71,22 +71,6 @@
ORDER BY date;
"""
- sql """set group_by_and_having_use_alias_first=true"""
- sql "set enable_nereids_planner=false" // nereids not support it
-
- qt_sql """
- SELECT
- date_format(date, '%x%v') AS `date`,
- count(date) AS `diff_days`
- FROM `tb_holiday`
- WHERE `date` between 20221111 AND 20221116
- GROUP BY date
- HAVING date = 20221111
- ORDER BY date;
- """
-
- sql "set enable_nereids_planner=default" // nereids not support bellow sql
-
qt_sql """
SELECT
date_format(date, '%x%v') AS `date2`,
@@ -107,8 +91,6 @@
ORDER BY date;
"""
- sql """set group_by_and_having_use_alias_first=false"""
-
sql """
CREATE TABLE `test_having_alias_tb` (
`id` int(11) NULL,
@@ -133,8 +115,6 @@
qt_case5 """ SELECT id, max(v1) v1 FROM test_having_alias_tb GROUP BY 1
having count(distinct v1)>1 ORDER BY id; """
qt_case_cir2273 """ select sum( id * 0.5 ) val from test_having_alias_tb
having val > 0; """
- sql """set enable_nereids_planner=true"""
- sql """set enable_fallback_to_original_planner=false"""
qt_case6 """
SELECT date_format(date, '%x%v') AS `date` FROM `tb_holiday` WHERE
`date` between 20221111 AND 20221116 HAVING date = 202245 ORDER BY date;
"""
diff --git
a/regression-test/suites/datatype_p0/nested_types/query/array_functions/test_array_functions_array_intersect_sort.groovy
b/regression-test/suites/datatype_p0/nested_types/query/array_functions/test_array_functions_array_intersect_sort.groovy
index 46c43dacce3..804834a2a11 100644
---
a/regression-test/suites/datatype_p0/nested_types/query/array_functions/test_array_functions_array_intersect_sort.groovy
+++
b/regression-test/suites/datatype_p0/nested_types/query/array_functions/test_array_functions_array_intersect_sort.groovy
@@ -16,68 +16,6 @@
// under the License.
suite("test_array_functions_array_intersect_sort", "p0") {
-
- sql "set enable_nereids_planner=false;"
- // ========= array_intersect ===========
- // with sort
- qt_oLd_sql "SELECT 'array_intersect-array-sort';"
- sql "drop table if exists tbl_array_intersect;"
- sql "create table tbl_array_intersect (date Date, arr Array<Int>)
ENGINE=OLAP DISTRIBUTED BY HASH(date) BUCKETS 1 PROPERTIES('replication_num' =
'1');"
-
- sql "insert into tbl_array_intersect values ('2019-01-01', [1,2,3]);"
- sql "insert into tbl_array_intersect values ('2019-01-02', [1,2]);"
- sql "insert into tbl_array_intersect values ('2019-01-03', [1]);"
- sql "insert into tbl_array_intersect values ('2019-01-04', []);"
-
- order_qt_old_sql "SELECT array_sort(array_intersect(arr, [1,2])) from
tbl_array_intersect order by date;"
- order_qt_old_sql "SELECT array_sort(array_intersect(arr, [])) from
tbl_array_intersect order by date;"
- order_qt_old_sql "SELECT array_sort(array_intersect([], arr)) from
tbl_array_intersect order by date;"
- order_qt_old_sql "SELECT array_sort(array_intersect([1,2], arr)) from
tbl_array_intersect order by date;"
- order_qt_old_sql "SELECT array_sort(array_intersect([1,2], [1,2,3,4]))
from tbl_array_intersect order by date;"
- order_qt_old_sql "SELECT array_sort(array_intersect([], [])) from
tbl_array_intersect order by date;"
-
-
- order_qt_old_sql "SELECT array_sort(array_intersect(arr, [1,2])) from
tbl_array_intersect order by date;"
- order_qt_old_sql "SELECT array_sort(array_intersect(arr, [])) from
tbl_array_intersect order by date;"
- order_qt_old_sql "SELECT array_sort(array_intersect([], arr)) from
tbl_array_intersect order by date;"
- order_qt_old_sql "SELECT array_sort(array_intersect([1,2], arr)) from
tbl_array_intersect order by date;"
- order_qt_old_sql "SELECT array_sort(array_intersect([1,2], [1,2,3,4]))
from tbl_array_intersect order by date;"
- order_qt_old_sql "SELECT array_sort(array_intersect([], [])) from
tbl_array_intersect order by date;"
-
-
- order_qt_old_sql "SELECT array_sort(array_intersect([-100], [156]));"
- order_qt_old_sql "SELECT array_sort(array_intersect([1], [257]));"
-
- order_qt_old_sql "SELECT array_sort(array_intersect(['a', 'b', 'c'], ['a',
'a']));"
- order_qt_old_sql "SELECT array_sort(array_intersect([1, 1], [2, 2]));"
- order_qt_old_sql "SELECT array_sort(array_intersect([1, 1], [1, 2]));"
- // nereids not support array_intersect with three argument
- order_qt_old_sql "SELECT array_sort(array_intersect([1, 1, 1], [3], [2, 2,
2]));"
- order_qt_old_sql "SELECT array_sort(array_intersect([1, 2], [1, 2], [2]));"
- order_qt_old_sql "SELECT array_sort(array_intersect([1, 1], [2, 1], [2,
2], [1]));"
- order_qt_old_sql "SELECT array_sort(array_intersect([1, 1], [2, 1], [2,
2], [2, 2, 2]));"
-
- // nereids not support array_intersect with one argument
- try {
- sql """
- SELECT array_sort(array_intersect([]));
- """
- } catch (Exception ex) {
- assertTrue(ex.getMessage().contains("No matching function with
signature: array_intersect(ARRAY<NULL_TYPE>)"))
- }
- try {
- sql """
- SELECT array_sort(array_intersect([1, 2, 3]));
- """
- } catch (Exception ex) {
- assertTrue(ex.getMessage().contains("No matching function with
signature: array_intersect(ARRAY<TINYINT>)"))
- }
-
- // nereids
- sql "set enable_nereids_planner=true;"
- sql "set enable_fallback_to_original_planner=false;"
-
-
// ========= array_intersect ===========
// with sort
qt_nereid_sql "SELECT 'array_intersect-array-sort';"
@@ -111,26 +49,17 @@ suite("test_array_functions_array_intersect_sort", "p0") {
order_qt_nereid_sql "SELECT array_sort(array_intersect(['a', 'b', 'c'],
['a', 'a']));"
order_qt_nereid_sql "SELECT array_sort(array_intersect([1, 1], [2, 2]));"
order_qt_nereid_sql "SELECT array_sort(array_intersect([1, 1], [1, 2]));"
- // nereids not support array_intersect with three argument
-// order_qt_nereid_sql "SELECT array_sort(array_intersect([1, 1, 1], [3],
[2, 2, 2]));"
-// order_qt_nereid_sql "SELECT array_sort(array_intersect([1, 2], [1, 2],
[2]));"
-// order_qt_nereid_sql "SELECT array_sort(array_intersect([1, 1], [2, 1],
[2, 2], [1]));"
-// order_qt_nereid_sql "SELECT array_sort(array_intersect([1, 1], [2, 1],
[2, 2], [2, 2, 2]));"
-//
-// // nereids not support array_intersect with one argument
-// try {
-// sql """
-// SELECT array_sort(array_intersect([]));
-// """
-// } catch (Exception ex) {
-// assertTrue(ex.getMessage().contains("No matching function with
signature: array_intersect(ARRAY<NULL_TYPE>)"))
-// }
-// try {
-// sql """
-// SELECT array_sort(array_intersect([1, 2, 3]));
-// """
-// } catch (Exception ex) {
-// assertTrue(ex.getMessage().contains("No matching function with
signature: array_intersect(ARRAY<TINYINT>)"))
-// }
-
+ order_qt_nereid_sql "SELECT array_sort(array_intersect([1, 1, 1], [3], [2,
2, 2]));"
+ order_qt_nereid_sql "SELECT array_sort(array_intersect([1, 2], [1, 2],
[2]));"
+ order_qt_nereid_sql "SELECT array_sort(array_intersect([1, 1], [2, 1], [2,
2], [1]));"
+ order_qt_nereid_sql "SELECT array_sort(array_intersect([1, 1], [2, 1], [2,
2], [2, 2, 2]));"
+
+ test {
+ sql "SELECT array_sort(array_intersect([]))"
+ exception "Can not found function 'array_intersect' which has 1 arity"
+ }
+ test {
+ sql "SELECT array_sort(array_intersect([1, 2, 3]))"
+ exception "Can not found function 'array_intersect' which has 1 arity"
+ }
}
diff --git
a/regression-test/suites/external_table_p0/tvf/test_local_tvf_with_complex_type_insertinto_doris.groovy
b/regression-test/suites/external_table_p0/tvf/test_local_tvf_with_complex_type_insertinto_doris.groovy
index c8bd8a8c2d6..596ed79eec9 100644
---
a/regression-test/suites/external_table_p0/tvf/test_local_tvf_with_complex_type_insertinto_doris.groovy
+++
b/regression-test/suites/external_table_p0/tvf/test_local_tvf_with_complex_type_insertinto_doris.groovy
@@ -19,7 +19,6 @@ import org.junit.Assert
// This suit test the `backends` tvf
suite("test_local_tvf_with_complex_type_insertinto_doris", "p0") {
- sql """set enable_nereids_planner=false"""
List<List<Object>> backends = sql """ select * from backends(); """
assertTrue(backends.size() > 0)
def be_id = backends[0][0]
diff --git
a/regression-test/suites/external_table_p2/tvf/test_tvf_view_count_p2.groovy
b/regression-test/suites/external_table_p2/tvf/test_tvf_view_count_p2.groovy
index 32b9bac9c70..1e2fbb29560 100644
--- a/regression-test/suites/external_table_p2/tvf/test_tvf_view_count_p2.groovy
+++ b/regression-test/suites/external_table_p2/tvf/test_tvf_view_count_p2.groovy
@@ -30,19 +30,11 @@ suite("test_tvf_view_count_p2",
"p2,external,tvf,external_remote,external_remote
"hadoop.username" = "hadoop",
"format"="parquet");"""
- def result = sql """explain verbose select count(1) from
tvf_view_count;"""
- def contain0 = false;
- def contain1 = false;
- for (String value : result) {
- if (value.contains("SlotDescriptor{id=0,")) {
- contain0 = true;
- }
- if (value.contains("SlotDescriptor{id=1,")) {
- contain1 = true;
- }
+ explain {
+ "select count(1) from tvf_view_count"
+ contains "SlotDescriptor{id=0,"
+ notContains "SlotDescriptor{id=1,"
}
- assertTrue(contain0)
- assertFalse(contain1)
sql """drop database if exists test_tvf_view_count_p2"""
}
diff --git a/regression-test/suites/javaudf_p0/test_javaudf_with_decimal.groovy
b/regression-test/suites/javaudf_p0/test_javaudf_with_decimal.groovy
index bf288728319..d8aedea8f1d 100644
--- a/regression-test/suites/javaudf_p0/test_javaudf_with_decimal.groovy
+++ b/regression-test/suites/javaudf_p0/test_javaudf_with_decimal.groovy
@@ -15,18 +15,11 @@
// specific language governing permissions and limitations
// under the License.
-import org.codehaus.groovy.runtime.IOGroovyMethods
-
-import java.nio.charset.StandardCharsets
-import java.nio.file.Files
-import java.nio.file.Paths
-
suite("test_javaudf_with_decimal") {
def jarPath =
"""${context.file.parent}/jars/java-udf-case-jar-with-dependencies.jar"""
- log.info("Jar path: ${jarPath}".toString())
+ log.info("Jar path: ${jarPath}")
try {
try_sql("drop function IF EXISTS getarrscale(Array<Decimal(15,3)>);")
- try_sql("drop function IF EXISTS
getmapscale(Map<Decimal(15,3),Decimal(15,6)>);")
try_sql("drop function IF EXISTS retscale(int);")
try_sql("drop table IF EXISTS dbwithDecimal;")
sql """
@@ -45,32 +38,16 @@ suite("test_javaudf_with_decimal") {
sql """ INSERT INTO dbwithDecimal
VALUES(1,[1.123,1.123456],{1.123:1.123456789}); """
sql """ INSERT INTO dbwithDecimal
VALUES(2,[2.123,2.123456],{2.123:2.123456789}); """
-
sql """
-
CREATE FUNCTION getarrscale(Array<Decimal(15,3)>) RETURNS int
PROPERTIES (
"file"="file://${jarPath}",
"symbol"="org.apache.doris.udf.MyArrayDecimal",
"always_nullable"="true",
"type"="JAVA_UDF"
);
-
"""
-
- sql """
-
- CREATE FUNCTION getmapscale(Map<Decimal(15,3),Decimal(15,6)>) RETURNS
int PROPERTIES (
- "file"="file://${jarPath}",
- "symbol"="org.apache.doris.udf.MyMapDecimal",
- "always_nullable"="true",
- "type"="JAVA_UDF"
- );
-
- """
-
sql """
-
CREATE FUNCTION retscale(int) RETURNS
Map<Decimal(15,10),Decimal(15,10)> PROPERTIES (
"file"="file://${jarPath}",
"symbol"="org.apache.doris.udf.MyMapRetDecimal",
@@ -79,18 +56,10 @@ suite("test_javaudf_with_decimal") {
);
"""
- sql """
- set enable_nereids_planner=false;
- """
-
- qt_select_1 """ select arr,getarrscale(arr) from dbwithDecimal order
by id; """
-
- qt_select_2 """ select mp,getmapscale(mp) from dbwithDecimal order by
id ; """
-
- qt_select_3 """ select id,retscale(id) from dbwithDecimal order by id;
"""
+ qt_getarrscale """ select arr,getarrscale(arr) from dbwithDecimal
order by id; """
+ qt_retscale """ select id,retscale(id) from dbwithDecimal order by id;
"""
} finally {
try_sql("drop function IF EXISTS getarrscale(Array<Decimal(15,3)>);")
- try_sql("drop function IF EXISTS
getmapscale(Map<Decimal(15,3),Decimal(15,6)>);")
try_sql("drop function IF EXISTS retscale(int);")
try_sql("drop table IF EXISTS dbwithDecimal;")
}
diff --git
a/regression-test/suites/query_p0/test_array_with_single_row_max_than_uint16.groovy
b/regression-test/suites/query_p0/test_array_with_single_row_max_than_uint16.groovy
index 6875c836d37..0294b215bf1 100644
---
a/regression-test/suites/query_p0/test_array_with_single_row_max_than_uint16.groovy
+++
b/regression-test/suites/query_p0/test_array_with_single_row_max_than_uint16.groovy
@@ -17,7 +17,6 @@
suite("test_array_with_single_row_max_than_uint16", "query") {
// define a sql table
- sql """set enable_nereids_planner=false"""
List<List<Object>> backends = sql """ select * from backends(); """
assertTrue(backends.size() > 0)
def be_id = backends[0][0]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]