This is an automated email from the ASF dual-hosted git repository.

zhangstar333 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 02fe71dcd66 [test](serialisation) Serialise some cases and enable 
str_to_date tests #26651
02fe71dcd66 is described below

commit 02fe71dcd66b65981e664ea327b555939c606ce2
Author: zclllyybb <[email protected]>
AuthorDate: Thu Nov 9 21:53:32 2023 +0800

    [test](serialisation) Serialise some cases and enable str_to_date tests 
#26651
    
    1 enable the cases about str_to_date, which have been muted because some 
parallel config influence.
    2 serialise some cases which called admin set config
---
 .../datetime_functions/test_date_function.out      | 27 ++++++++++++++++++++++
 .../datetime_functions/test_date_function.out      | 27 ++++++++++++++++++++++
 .../datetime_functions/test_date_function.groovy   | 26 ++++++++++-----------
 .../cast_function/test_cast_string_to_array.groovy |  2 +-
 .../cast_function/test_cast_to_datetime.groovy     |  2 +-
 .../datetime_functions/test_date_function.groovy   | 26 ++++++++++-----------
 6 files changed, 82 insertions(+), 28 deletions(-)

diff --git 
a/regression-test/data/nereids_p0/sql_functions/datetime_functions/test_date_function.out
 
b/regression-test/data/nereids_p0/sql_functions/datetime_functions/test_date_function.out
index 005e71e9fb7..96a8160f877 100644
--- 
a/regression-test/data/nereids_p0/sql_functions/datetime_functions/test_date_function.out
+++ 
b/regression-test/data/nereids_p0/sql_functions/datetime_functions/test_date_function.out
@@ -255,6 +255,24 @@ February
 -- !sql --
 67890
 
+-- !sql --
+2014-12-21T12:34:56
+
+-- !sql --
+2014-12-21T12:34:56
+
+-- !sql --
+2014-12-21T12:34:56.789
+
+-- !sql --
+2023-07-05T02:09:55.880
+
+-- !sql --
+2004-10-18
+
+-- !sql --
+2020-09-01T00:00
+
 -- !sql --
 2020-01-01T00:00
 
@@ -455,6 +473,15 @@ true
 -- !sql --
 2022 31 4
 
+-- !sql --
+\N
+
+-- !sql --
+2022-07-12T20:00:45
+
+-- !sql --
+2018-04-02T15:03:28
+
 -- !sql --
 19     19      21      22      23      24      25      26
 
diff --git 
a/regression-test/data/query_p0/sql_functions/datetime_functions/test_date_function.out
 
b/regression-test/data/query_p0/sql_functions/datetime_functions/test_date_function.out
index 2f1b3ddf7ac..75e07024c79 100644
--- 
a/regression-test/data/query_p0/sql_functions/datetime_functions/test_date_function.out
+++ 
b/regression-test/data/query_p0/sql_functions/datetime_functions/test_date_function.out
@@ -263,6 +263,24 @@ February
 -- !sql --
 767890
 
+-- !sql --
+2014-12-21T12:34:56
+
+-- !sql --
+2014-12-21T12:34:56
+
+-- !sql --
+2014-12-21T12:34:56.789
+
+-- !sql --
+2023-07-05T02:09:55.880
+
+-- !sql --
+2004-10-18
+
+-- !sql --
+2020-09-01T00:00
+
 -- !sql_year_floor --
 2023-01-01
 
@@ -469,6 +487,15 @@ true
 -- !sql --
 2022 31 4
 
+-- !sql --
+\N
+
+-- !sql --
+2022-07-12T20:00:45
+
+-- !sql --
+2018-04-02T15:03:28
+
 -- !sql --
 19     19      21      22      23      24      25      26
 
diff --git 
a/regression-test/suites/nereids_p0/sql_functions/datetime_functions/test_date_function.groovy
 
b/regression-test/suites/nereids_p0/sql_functions/datetime_functions/test_date_function.groovy
index 51164d25767..6e5506d5775 100644
--- 
a/regression-test/suites/nereids_p0/sql_functions/datetime_functions/test_date_function.groovy
+++ 
b/regression-test/suites/nereids_p0/sql_functions/datetime_functions/test_date_function.groovy
@@ -326,16 +326,16 @@ suite("test_date_function") {
     qt_sql """ select microsecond(cast('1999-01-02 10:11:12.067890' as 
datetimev2(6))); """
 
     // STR_TO_DATE
-    // sql """ truncate table ${tableName} """
-    // sql """ insert into ${tableName} values ("2014-12-21 12:34:56")  """
-    // qt_sql """ select str_to_date(test_datetime, '%Y-%m-%d %H:%i:%s') from 
${tableName}; """
-    // qt_sql """ select str_to_date("2014-12-21 12:34%3A56", '%Y-%m-%d 
%H:%i%%3A%s'); """
-    // qt_sql """ select str_to_date("2014-12-21 12:34:56.789 PM", '%Y-%m-%d 
%h:%i:%s.%f %p'); """
-    // qt_sql """ select 
str_to_date('2023-07-05T02:09:55.880Z','%Y-%m-%dT%H:%i:%s.%fZ') """
-    // qt_sql """ select str_to_date('200442 Monday', '%X%V %W') """
-    // sql """ truncate table ${tableName} """
-    // sql """ insert into ${tableName} values ("2020-09-01")  """
-    // qt_sql """ select str_to_date(test_datetime, "%Y-%m-%d %H:%i:%s") from 
${tableName};"""
+    sql """ truncate table ${tableName} """
+    sql """ insert into ${tableName} values ("2014-12-21 12:34:56")  """
+    qt_sql """ select str_to_date(test_datetime, '%Y-%m-%d %H:%i:%s') from 
${tableName}; """
+    qt_sql """ select str_to_date("2014-12-21 12:34%3A56", '%Y-%m-%d 
%H:%i%%3A%s'); """
+    qt_sql """ select str_to_date("2014-12-21 12:34:56.789 PM", '%Y-%m-%d 
%h:%i:%s.%f %p'); """
+    qt_sql """ select 
str_to_date('2023-07-05T02:09:55.880Z','%Y-%m-%dT%H:%i:%s.%fZ') """
+    qt_sql """ select str_to_date('200442 Monday', '%X%V %W') """
+    sql """ truncate table ${tableName} """
+    sql """ insert into ${tableName} values ("2020-09-01")  """
+    qt_sql """ select str_to_date(test_datetime, "%Y-%m-%d %H:%i:%s") from 
${tableName};"""
 
     // TIME_ROUND
     qt_sql """ SELECT YEAR_FLOOR('20200202000000') """
@@ -468,9 +468,9 @@ suite("test_date_function") {
     sql """ drop table ${tableName} """
 
     qt_sql """ select date_format('2022-08-04', '%X %V %w'); """
-    // qt_sql """ select STR_TO_DATE('Tue Jul 12 20:00:45 CST 2022', '%a %b %e 
%H:%i:%s %Y'); """
-    // qt_sql """ select STR_TO_DATE('Tue Jul 12 20:00:45 CST 2022', '%a %b %e 
%T CST %Y'); """
-    // qt_sql """ select STR_TO_DATE('2018-4-2 15:3:28','%Y-%m-%d %H:%i:%s'); 
"""
+    qt_sql """ select STR_TO_DATE('Tue Jul 12 20:00:45 CST 2022', '%a %b %e 
%H:%i:%s %Y'); """
+    qt_sql """ select STR_TO_DATE('Tue Jul 12 20:00:45 CST 2022', '%a %b %e %T 
CST %Y'); """
+    qt_sql """ select STR_TO_DATE('2018-4-2 15:3:28','%Y-%m-%d %H:%i:%s'); """
 
     qt_sql """ select length(cast(now() as string)), length(cast(now(0) as 
string)), length(cast(now(1) as string)),
                       length(cast(now(2) as string)), length(cast(now(3) as 
string)), length(cast(now(4) as string)),
diff --git 
a/regression-test/suites/query_p0/sql_functions/cast_function/test_cast_string_to_array.groovy
 
b/regression-test/suites/query_p0/sql_functions/cast_function/test_cast_string_to_array.groovy
index b246fb55343..28112ed8e0f 100644
--- 
a/regression-test/suites/query_p0/sql_functions/cast_function/test_cast_string_to_array.groovy
+++ 
b/regression-test/suites/query_p0/sql_functions/cast_function/test_cast_string_to_array.groovy
@@ -15,7 +15,7 @@
 // specific language governing permissions and limitations
 // under the License.
 
-suite("test_cast_string_to_array") {
+suite("test_cast_string_to_array", "nonConcurrent") {
     // cast string to array<int>
     qt_sql """ select cast ("[1,2,3]" as array<int>) """
 
diff --git 
a/regression-test/suites/query_p0/sql_functions/cast_function/test_cast_to_datetime.groovy
 
b/regression-test/suites/query_p0/sql_functions/cast_function/test_cast_to_datetime.groovy
index 0dc3c9f19f8..9437dc6eb7a 100644
--- 
a/regression-test/suites/query_p0/sql_functions/cast_function/test_cast_to_datetime.groovy
+++ 
b/regression-test/suites/query_p0/sql_functions/cast_function/test_cast_to_datetime.groovy
@@ -15,7 +15,7 @@
 // specific language governing permissions and limitations
 // under the License.
 
-suite("test_cast_to_datetime") {
+suite("test_cast_to_datetime", "nonConcurrent") {
     // cast string of invalid datetime to datetime
     qt_cast_string_to_datetime_invalid0 """ select cast("627492340" as 
datetime); """
     qt_cast_string_to_datetime_invalid1 """ select cast("" as datetime); """
diff --git 
a/regression-test/suites/query_p0/sql_functions/datetime_functions/test_date_function.groovy
 
b/regression-test/suites/query_p0/sql_functions/datetime_functions/test_date_function.groovy
index 045fa399173..186123aeca5 100644
--- 
a/regression-test/suites/query_p0/sql_functions/datetime_functions/test_date_function.groovy
+++ 
b/regression-test/suites/query_p0/sql_functions/datetime_functions/test_date_function.groovy
@@ -327,16 +327,16 @@ suite("test_date_function") {
     qt_sql """ select microsecond(cast('1999-01-02 10:11:12.767890' as 
datetimev2(6))) """
 
     // STR_TO_DATE
-    // sql """ truncate table ${tableName} """
-    // sql """ insert into ${tableName} values ("2014-12-21 12:34:56")  """
-    // qt_sql """ select str_to_date(test_datetime, '%Y-%m-%d %H:%i:%s') from 
${tableName}; """
-    // qt_sql """ select str_to_date("2014-12-21 12:34%3A56", '%Y-%m-%d 
%H:%i%%3A%s'); """
-    // qt_sql """ select str_to_date("2014-12-21 12:34:56.789 PM", '%Y-%m-%d 
%h:%i:%s.%f %p'); """
-    // qt_sql """ select 
str_to_date('2023-07-05T02:09:55.880Z','%Y-%m-%dT%H:%i:%s.%fZ') """
-    // qt_sql """ select str_to_date('200442 Monday', '%X%V %W') """
-    // sql """ truncate table ${tableName} """
-    // sql """ insert into ${tableName} values ("2020-09-01")  """
-    // qt_sql """ select str_to_date(test_datetime, "%Y-%m-%d %H:%i:%s") from 
${tableName};"""
+    sql """ truncate table ${tableName} """
+    sql """ insert into ${tableName} values ("2014-12-21 12:34:56")  """
+    qt_sql """ select str_to_date(test_datetime, '%Y-%m-%d %H:%i:%s') from 
${tableName}; """
+    qt_sql """ select str_to_date("2014-12-21 12:34%3A56", '%Y-%m-%d 
%H:%i%%3A%s'); """
+    qt_sql """ select str_to_date("2014-12-21 12:34:56.789 PM", '%Y-%m-%d 
%h:%i:%s.%f %p'); """
+    qt_sql """ select 
str_to_date('2023-07-05T02:09:55.880Z','%Y-%m-%dT%H:%i:%s.%fZ') """
+    qt_sql """ select str_to_date('200442 Monday', '%X%V %W') """
+    sql """ truncate table ${tableName} """
+    sql """ insert into ${tableName} values ("2020-09-01")  """
+    qt_sql """ select str_to_date(test_datetime, "%Y-%m-%d %H:%i:%s") from 
${tableName};"""
 
     // TIME_ROUND
     qt_sql_year_floor """ select year_floor(cast('2023-04-28' as date)); """
@@ -470,9 +470,9 @@ suite("test_date_function") {
     sql """ drop table ${tableName} """
 
     qt_sql """ select date_format('2022-08-04', '%X %V %w'); """
-    // qt_sql """ select STR_TO_DATE('Tue Jul 12 20:00:45 CST 2022', '%a %b %e 
%H:%i:%s %Y'); """
-    // qt_sql """ select STR_TO_DATE('Tue Jul 12 20:00:45 CST 2022', '%a %b %e 
%T CST %Y'); """
-    // qt_sql """ select STR_TO_DATE('2018-4-2 15:3:28','%Y-%m-%d %H:%i:%s'); 
"""
+    qt_sql """ select STR_TO_DATE('Tue Jul 12 20:00:45 CST 2022', '%a %b %e 
%H:%i:%s %Y'); """
+    qt_sql """ select STR_TO_DATE('Tue Jul 12 20:00:45 CST 2022', '%a %b %e %T 
CST %Y'); """
+    qt_sql """ select STR_TO_DATE('2018-4-2 15:3:28','%Y-%m-%d %H:%i:%s'); """
 
     qt_sql """ select length(cast(now() as string)), length(cast(now(0) as 
string)), length(cast(now(1) as string)),
                       length(cast(now(2) as string)), length(cast(now(3) as 
string)), length(cast(now(4) as string)),


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to