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

yiguolei pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-2.0 by this push:
     new cddf62b4c91 [fix](jdbc_catalog) fix error datetime literal caused be 
core (#34977)
cddf62b4c91 is described below

commit cddf62b4c91ac4201b622e7ba672375f2e46e31f
Author: Yulei-Yang <[email protected]>
AuthorDate: Fri May 17 22:25:43 2024 +0800

    [fix](jdbc_catalog) fix error datetime literal caused be core (#34977)
    
    * [fix](jdbc_catalog) fix error datetime literal caused be core
    
    * fix error regression test
    
    * fix regression test
---
 .../org/apache/doris/analysis/StringLiteral.java   |  5 +---
 .../datatype_p0/datetimev2/test_invalid_hour.out   |  2 +-
 .../data/datatype_p0/datetimev2/test_timezone.out  |  4 ----
 .../datetime_functions/test_date_function.out      |  2 +-
 .../test_inlineview_with_window_function.groovy    |  8 +++----
 .../datetimev2/test_invalid_hour.groovy            |  4 ++--
 .../datatype_p0/datetimev2/test_timezone.groovy    | 28 ++++++++++------------
 .../suites/mv_p0/test_o2/test_o2.groovy            |  4 ++--
 .../join/test_runtimefilter_on_datev2.groovy       | 10 ++++----
 .../datetime_functions/test_date_function.groovy   |  2 +-
 .../nereids_syntax_p0/test_cast_datetime.groovy    |  2 +-
 .../test_timestamp_arithmetic.groovy               |  2 +-
 .../suites/point_query_p0/test_point_query.groovy  | 24 +++++++++----------
 .../datetime_functions/test_date_function.groovy   |  4 ++--
 14 files changed, 45 insertions(+), 56 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/analysis/StringLiteral.java 
b/fe/fe-core/src/main/java/org/apache/doris/analysis/StringLiteral.java
index 57bc67fdc3e..4aa7d8ff7a3 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/StringLiteral.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/StringLiteral.java
@@ -257,13 +257,10 @@ public class StringLiteral extends LiteralExpr {
                     break;
             }
         } else if (targetType.isDateType()) {
-            // FE only support 'yyyy-MM-dd hh:mm:ss' && 'yyyy-MM-dd' format
-            // so if FE unchecked cast fail, we also build CastExpr for BE
-            // BE support other format such as 'yyyyMMdd'...
             try {
                 return convertToDate(targetType);
             } catch (AnalysisException e) {
-                // pass;
+                throw new AnalysisException(e.getMessage());
             }
         } else if (targetType.equals(type)) {
             return this;
diff --git a/regression-test/data/datatype_p0/datetimev2/test_invalid_hour.out 
b/regression-test/data/datatype_p0/datetimev2/test_invalid_hour.out
index 6a036dfeef2..c4964d22a76 100644
--- a/regression-test/data/datatype_p0/datetimev2/test_invalid_hour.out
+++ b/regression-test/data/datatype_p0/datetimev2/test_invalid_hour.out
@@ -6,7 +6,7 @@
 \N
 
 -- !sql --
-1      2023-12-12 24:00:00     \N      \N
+1      2023-12-12 12:00:00     2023-12-12T11:00        2023-12-12T12:00
 2      2023-12-12 23:00:00     2023-12-12T23:00        2023-12-12T23:00
 
 -- !sql --
diff --git a/regression-test/data/datatype_p0/datetimev2/test_timezone.out 
b/regression-test/data/datatype_p0/datetimev2/test_timezone.out
index 5dd1b615b84..152434df2d9 100644
--- a/regression-test/data/datatype_p0/datetimev2/test_timezone.out
+++ b/regression-test/data/datatype_p0/datetimev2/test_timezone.out
@@ -3,9 +3,7 @@
 2022-01-01T01:02:55    2022-01-01
 2022-02-01T03:02:55    2022-02-01
 2022-02-28T19:02:55    2022-03-01
-2022-04-01T09:02:55    2022-03-31
 2022-05-01T00:32:55    2022-05-01
-2022-05-31T22:32:55    2022-06-01
 2022-06-30T20:02:55    2022-07-01
 2022-07-31T21:00       2022-08-01
 
@@ -13,9 +11,7 @@
 2022-01-01T01:02:55    2022-01-01
 2022-02-01T03:02:55    2022-02-01
 2022-02-28T19:02:55    2022-03-01
-2022-04-01T09:02:55    2022-03-31
 2022-05-01T00:32:55    2022-05-01
-2022-05-31T22:32:55    2022-06-01
 2022-06-30T20:02:55    2022-07-01
 2022-07-31T21:00       2022-08-01
 
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 ff0cde4324d..587eed35e9b 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
@@ -183,7 +183,7 @@
 16
 
 -- !sql --
-\N
+-368879
 
 -- !sql --
 31
diff --git 
a/regression-test/suites/correctness_p0/test_inlineview_with_window_function.groovy
 
b/regression-test/suites/correctness_p0/test_inlineview_with_window_function.groovy
index 359874f52d0..66ca87bc39b 100644
--- 
a/regression-test/suites/correctness_p0/test_inlineview_with_window_function.groovy
+++ 
b/regression-test/suites/correctness_p0/test_inlineview_with_window_function.groovy
@@ -111,10 +111,10 @@ suite("test_inlineview_with_window_function") {
             group by ordernum
             ORDER BY ordernum;"""
 
-    sql """insert into test_table_aaa values('cib2205045_1_1s','2023/6/10 
3:55:33','{"DB1":168939,"DNT":"2023-06-10 03:55:33"}');"""
-    sql """insert into test_table_aaa values('cib2205045_1_1s','2023/6/10 
3:56:33','{"DB1":168939,"DNT":"2023-06-10 03:56:33"}');"""
-    sql """insert into test_table_aaa values('cib2205045_1_1s','2023/6/10 
3:57:33','{"DB1":168939,"DNT":"2023-06-10 03:57:33"}');"""
-    sql """insert into test_table_aaa values('cib2205045_1_1s','2023/6/10 
3:58:33','{"DB1":168939,"DNT":"2023-06-10 03:58:33"}');"""
+    sql """insert into test_table_aaa values('cib2205045_1_1s','2023-06-10 
03:55:33','{"DB1":168939,"DNT":"2023-06-10 03:55:33"}');"""
+    sql """insert into test_table_aaa values('cib2205045_1_1s','2023-06-10 
03:56:33','{"DB1":168939,"DNT":"2023-06-10 03:56:33"}');"""
+    sql """insert into test_table_aaa values('cib2205045_1_1s','2023-06-10 
03:57:33','{"DB1":168939,"DNT":"2023-06-10 03:57:33"}');"""
+    sql """insert into test_table_aaa values('cib2205045_1_1s','2023-06-10 
03:58:33','{"DB1":168939,"DNT":"2023-06-10 03:58:33"}');"""
 
     qt_order """select
                 '2023-06-10',
diff --git 
a/regression-test/suites/datatype_p0/datetimev2/test_invalid_hour.groovy 
b/regression-test/suites/datatype_p0/datetimev2/test_invalid_hour.groovy
index e72f0dc6cba..2af5db41506 100644
--- a/regression-test/suites/datatype_p0/datetimev2/test_invalid_hour.groovy
+++ b/regression-test/suites/datatype_p0/datetimev2/test_invalid_hour.groovy
@@ -58,7 +58,7 @@ suite("test_invalid_hour") {
 
     sql """
         insert into test_invalid_hour_null values
-            (1, "2023-12-12 24:00:00", "2023-12-12 24:00:00"),
+            (1, "2023-12-12 12:00:00", "2023-12-12 11:00:00"),
             (2, "2023-12-12 23:00:00", "2023-12-12 23:00:00")
     """
 
@@ -76,7 +76,7 @@ suite("test_invalid_hour") {
         """
     } catch (Exception e) {
                 logger.info("exception: " + e)
-                assertTrue(e.toString().contains("Insert has filtered data in 
strict mode"))
+                assertTrue(e.toString().contains("Invalid date value"))
             }
     
     qt_sql """
diff --git a/regression-test/suites/datatype_p0/datetimev2/test_timezone.groovy 
b/regression-test/suites/datatype_p0/datetimev2/test_timezone.groovy
index c15404bf023..a49f7168357 100644
--- a/regression-test/suites/datatype_p0/datetimev2/test_timezone.groovy
+++ b/regression-test/suites/datatype_p0/datetimev2/test_timezone.groovy
@@ -35,26 +35,22 @@ suite("test_timezone") {
     sql """ set time_zone = '+02:00' """
 
     sql """ set enable_nereids_planner = false """
-    sql """insert into ${table} values('2022-01-01 01:02:55', '2022-01-01 
01:02:55.123')"""
-    sql """insert into ${table} values('2022-02-01 01:02:55Z', '2022-02-01 
01:02:55.123Z')"""
-    sql """insert into ${table} values('2022-03-01 01:02:55UTC+8', '2022-03-01 
01:02:55.123UTC')"""
-    sql """insert into ${table} values('2022-04-01T01:02:55UTC-6', 
'2022-04-01T01:02:55.123UTC+6')"""
-    sql """insert into ${table} values('2022-05-01 01:02:55+02:30', 
'2022-05-01 01:02:55.123-02:30')"""
-    sql """insert into ${table} values('2022-06-01T01:02:55+04:30', 
'2022-06-01 01:02:55.123-07:30')"""
-    sql """insert into ${table} values('20220701010255+07:00', 
'20220701010255-05:00')"""
-    sql """insert into ${table} values('20220801GMT+5', '20220801GMT-3')"""
+    sql """insert into ${table} values('2022-01-01 01:02:55', '2022-01-01')"""
+    sql """insert into ${table} values('2022-02-01 01:02:55Z', '2022-02-01')"""
+    sql """insert into ${table} values('2022-03-01 01:02:55UTC+8', 
'2022-03-01')"""
+    sql """insert into ${table} values('2022-05-01 01:02:55+02:30', 
'2022-05-01')"""
+    sql """insert into ${table} values('20220701010255+07:00', '20220701')"""
+    sql """insert into ${table} values('20220801GMT+5', '20220801')"""
     qt_analysis "select * from ${table} order by k1"
 
     sql """ truncate table ${table} """
     
     sql """ set enable_nereids_planner = true """
-    sql """insert into ${table} values('2022-01-01 01:02:55', '2022-01-01 
01:02:55.123')"""
-    sql """insert into ${table} values('2022-02-01 01:02:55Z', '2022-02-01 
01:02:55.123Z')"""
-    sql """insert into ${table} values('2022-03-01 01:02:55UTC+8', '2022-03-01 
01:02:55.123UTC')"""
-    sql """insert into ${table} values('2022-04-01T01:02:55UTC-6', 
'2022-04-01T01:02:55.123UTC+6')"""
-    sql """insert into ${table} values('2022-05-01 01:02:55+02:30', 
'2022-05-01 01:02:55.123-02:30')"""
-    sql """insert into ${table} values('2022-06-01T01:02:55+04:30', 
'2022-06-01 01:02:55.123-07:30')"""
-    sql """insert into ${table} values('20220701010255+07:00', 
'20220701010255-05:00')"""
-    sql """insert into ${table} values('20220801GMT+5', '20220801GMT-3')"""
+    sql """insert into ${table} values('2022-01-01 01:02:55', '2022-01-01')"""
+    sql """insert into ${table} values('2022-02-01 01:02:55Z', '2022-02-01')"""
+    sql """insert into ${table} values('2022-03-01 01:02:55UTC+8', 
'2022-03-01')"""
+    sql """insert into ${table} values('2022-05-01 01:02:55+02:30', 
'2022-05-01')"""
+    sql """insert into ${table} values('20220701010255+07:00', '20220701')"""
+    sql """insert into ${table} values('20220801GMT+5', '20220801')"""
     qt_nereids "select * from ${table} order by k1"
 }
diff --git a/regression-test/suites/mv_p0/test_o2/test_o2.groovy 
b/regression-test/suites/mv_p0/test_o2/test_o2.groovy
index c9990253584..a2c6201c74b 100644
--- a/regression-test/suites/mv_p0/test_o2/test_o2.groovy
+++ b/regression-test/suites/mv_p0/test_o2/test_o2.groovy
@@ -45,12 +45,12 @@ suite ("test_o2") {
         );
         """
 
-    sql """insert into o2_order_events values ("2023-08-16 22:27:00 
","ax",1,"asd",2,1,1,1,1,1,1,1);"""
+    sql """insert into o2_order_events values ("2023-08-16 
22:27:00","ax",1,"asd",2,1,1,1,1,1,1,1);"""
 
     createMV ("""
             create materialized view o2_order_events_mv as select 
ts,metric_name,platform,sum(count_value) from o2_order_events group by 
ts,metric_name,platform;;""")
 
-    sql """insert into o2_order_events values ("2023-08-16 22:27:00 
","ax",1,"asd",2,1,1,1,1,1,1,1);"""
+    sql """insert into o2_order_events values ("2023-08-16 
22:27:00","ax",1,"asd",2,1,1,1,1,1,1,1);"""
 
     explain {
         sql("select ts,metric_name,platform,sum(count_value) from 
o2_order_events group by ts,metric_name,platform;")
diff --git 
a/regression-test/suites/nereids_p0/join/test_runtimefilter_on_datev2.groovy 
b/regression-test/suites/nereids_p0/join/test_runtimefilter_on_datev2.groovy
index 768ef7da586..38710ff47b9 100644
--- a/regression-test/suites/nereids_p0/join/test_runtimefilter_on_datev2.groovy
+++ b/regression-test/suites/nereids_p0/join/test_runtimefilter_on_datev2.groovy
@@ -251,12 +251,12 @@ suite("test_runtimefilter_on_datev2", "nereids_p0") {
     """
     sql """
         insert into dt_rftest_l values
-            ("2001-11-11 11:11:11.123455"),
-            ("2011-11-11 11:11:11.123455"),
-            ("9999-11-11 11:11:11.123456");
+            ("2001-11-11"),
+            ("2011-11-11"),
+            ("9999-11-11");
     """
     sql """
-        insert into dt_rftest_r values("2011-11-11 11:11:11.123456");
+        insert into dt_rftest_r values("2011-11-11");
     """
     qt_datetime_rf_1_p1 """
         select /*+SET_VAR(parallel_pipeline_task_num=1)*/ * from dt_rftest_l 
join dt_rftest_r on k1_date_l = k1_date_r order by 1, 2; 
@@ -325,7 +325,7 @@ suite("test_runtimefilter_on_datev2", "nereids_p0") {
     """
 
     sql """ insert into dt_rftest_l values
-        ("9999-12-31 23:59:59");
+        ("9999-12-31");
     """
     sql """ insert into dt_rftest_r values
         ("9999-12-31 23:59:59.999999");
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 2c84eba4a43..9db6c65547e 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
@@ -610,7 +610,7 @@ suite("test_date_function") {
         ('2022-01-01', '2022-01-01', '2022-01-01 00:00:00', '2022-01-01 
00:00:00'), 
         ('2000-02-01', '2000-02-01', '2000-02-01 00:00:00', '2000-02-01 
00:00:00.123'), 
         ('2022-02-27', '2022-02-27', '2022-02-27 00:00:00', '2022-02-27 
00:00:00'),
-        ('2022-02-28', '2022-02-28', '2022-02-28T23:59:59', 
'2022-02-28T23:59:59');"""
+        ('2022-02-28', '2022-02-28', '2022-02-28 23:59:59', '2022-02-28 
23:59:59');"""
     qt_sql """
         select last_day(birth), last_day(birth1), 
                 last_day(birth2), last_day(birth3) 
diff --git a/regression-test/suites/nereids_syntax_p0/test_cast_datetime.groovy 
b/regression-test/suites/nereids_syntax_p0/test_cast_datetime.groovy
index 924938c136e..2dc4f346da7 100644
--- a/regression-test/suites/nereids_syntax_p0/test_cast_datetime.groovy
+++ b/regression-test/suites/nereids_syntax_p0/test_cast_datetime.groovy
@@ -36,7 +36,7 @@ suite("test_cast_datetime") {
     );
     """
 
-    sql "insert into casttbl values ('2000-01-01', '2000-01-01 12:12:12', 
'2000-01-01', '2000-01-01 12:12:12');"
+    sql "insert into casttbl values ('2000-01-01', '2000-01-01', '2000-01-01', 
'2000-01-01 12:12:12');"
 
     sql "set enable_nereids_planner=true;"
 
diff --git 
a/regression-test/suites/nereids_syntax_p0/test_timestamp_arithmetic.groovy 
b/regression-test/suites/nereids_syntax_p0/test_timestamp_arithmetic.groovy
index 47c52578730..cd61c2b3940 100644
--- a/regression-test/suites/nereids_syntax_p0/test_timestamp_arithmetic.groovy
+++ b/regression-test/suites/nereids_syntax_p0/test_timestamp_arithmetic.groovy
@@ -55,7 +55,7 @@ suite("nereids_timestamp_arithmetic") {
     """
 
     sql """
-        INSERT INTO nereids_test_ta VALUES (1, '0001-01-01', '0001-01-01', 
'0001-01-01 00:01:01', '0001-01-01: 00:01:01.001', '0001-01-01 00:01:01.00305');
+        INSERT INTO nereids_test_ta VALUES (1, '0001-01-01', '0001-01-01', 
'0001-01-01 00:01:01', '0001-01-01 00:01:01.001', '0001-01-01 00:01:01.00305');
     """
 
     qt_test_add """
diff --git a/regression-test/suites/point_query_p0/test_point_query.groovy 
b/regression-test/suites/point_query_p0/test_point_query.groovy
index 5be89b840b1..da74b64f8e2 100644
--- a/regression-test/suites/point_query_p0/test_point_query.groovy
+++ b/regression-test/suites/point_query_p0/test_point_query.groovy
@@ -128,16 +128,16 @@ suite("test_point_query") {
                 def sql2 = create_table_sql("\"function_column.sequence_col\" 
= 'k6',")
                 sql """ ${sql2} """
             }
-            sql """ INSERT INTO ${tableName} VALUES(1231, 119291.11, "ddd", 
"laooq", null, "2020-01-01 12:36:38", null, "1022-01-01 11:30:38", null, 
1.111112, [119181.1111, 819019.1191, null], null) """
-            sql """ INSERT INTO ${tableName} VALUES(1232, 12222.99121135, 
"xxx", "laooq", "2023-01-02", "2020-01-01 12:36:38", 522.762, "2022-01-01 
11:30:38", 1, 212.111, null, null) """
-            sql """ INSERT INTO ${tableName} VALUES(1233, 1.392932911, "yyy", 
"laooq", "2024-01-02", "2020-01-01 12:36:38", 52.862, "3022-01-01 11:30:38", 0, 
5973903488739435.668, [119181.1111, null, 819019.1191], ["dijiiixxx"]) """
-            sql """ INSERT INTO ${tableName} VALUES(1234, 12919291.129191137, 
"xxddd", "laooq", "2025-01-02", "2020-01-01 12:36:38", 552.872, "4022-01-01 
11:30:38", 1, 5973903488739435.668, [1888109181.192111, 192129019.1191], ["1", 
"2", "3"]) """
-            sql """ INSERT INTO ${tableName} VALUES(1235, 991129292901.11138, 
"dd", null, "2120-01-02", "2020-01-01 12:36:38", 652.692, "5022-01-01 
11:30:38", 0, 90696620686827832.374, [119181.1111], ["${generateString(251)}"]) 
"""
-            sql """ INSERT INTO ${tableName} VALUES(1236, 100320.11139, "laa   
 ddd", "laooq", "2220-01-02", "2020-01-01 12:36:38", 2.7692, "6022-01-01 
11:30:38", 1, 23698.299, [], ["${generateString(251)}"]) """
-            sql """ INSERT INTO ${tableName} VALUES(1237, 120939.11130, "a    
ddd", "laooq", "2030-01-02", "2020-01-01 12:36:38", 22.822, "7022-01-01 
11:30:38", 0, 90696620686827832.374, [1.1, 2.2, 3.3, 4.4, 5.5], []) """
-            sql """ INSERT INTO ${tableName} VALUES(251, 120939.11130, 
"${generateString(251)}", "laooq", "2030-01-02", "2020-01-01 12:36:38", 251, 
"7022-01-01 11:30:38", 1, 90696620686827832.374, [11111], []) """
-            sql """ INSERT INTO ${tableName} VALUES(252, 120939.11130, 
"${generateString(252)}", "laooq", "2030-01-02", "2020-01-01 12:36:38", 252, 
"7022-01-01 11:30:38", 0, 90696620686827832.374, [0], null) """
-            sql """ INSERT INTO ${tableName} VALUES(298, 120939.11130, 
"${generateString(298)}", "laooq", "2030-01-02", "2020-01-01 12:36:38", 298, 
"7022-01-01 11:30:38", 1, 90696620686827832.374, [], []) """
+            sql """ INSERT INTO ${tableName} VALUES(1231, 119291.11, "ddd", 
"laooq", null, "2020-01-01 12:36:38", null, "1022-01-01", null, 1.111112, 
[119181.1111, 819019.1191, null], null) """
+            sql """ INSERT INTO ${tableName} VALUES(1232, 12222.99121135, 
"xxx", "laooq", "2023-01-02", "2020-01-01 12:36:38", 522.762, "2022-01-01", 1, 
212.111, null, null) """
+            sql """ INSERT INTO ${tableName} VALUES(1233, 1.392932911, "yyy", 
"laooq", "2024-01-02", "2020-01-01 12:36:38", 52.862, "3022-01-01", 0, 
5973903488739435.668, [119181.1111, null, 819019.1191], ["dijiiixxx"]) """
+            sql """ INSERT INTO ${tableName} VALUES(1234, 12919291.129191137, 
"xxddd", "laooq", "2025-01-02", "2020-01-01 12:36:38", 552.872, "4022-01-01", 
1, 5973903488739435.668, [1888109181.192111, 192129019.1191], ["1", "2", "3"]) 
"""
+            sql """ INSERT INTO ${tableName} VALUES(1235, 991129292901.11138, 
"dd", null, "2120-01-02", "2020-01-01 12:36:38", 652.692, "5022-01-01", 0, 
90696620686827832.374, [119181.1111], ["${generateString(251)}"]) """
+            sql """ INSERT INTO ${tableName} VALUES(1236, 100320.11139, "laa   
 ddd", "laooq", "2220-01-02", "2020-01-01 12:36:38", 2.7692, "6022-01-01", 1, 
23698.299, [], ["${generateString(251)}"]) """
+            sql """ INSERT INTO ${tableName} VALUES(1237, 120939.11130, "a    
ddd", "laooq", "2030-01-02", "2020-01-01 12:36:38", 22.822, "7022-01-01", 0, 
90696620686827832.374, [1.1, 2.2, 3.3, 4.4, 5.5], []) """
+            sql """ INSERT INTO ${tableName} VALUES(251, 120939.11130, 
"${generateString(251)}", "laooq", "2030-01-02", "2020-01-01 12:36:38", 251, 
"7022-01-01", 1, 90696620686827832.374, [11111], []) """
+            sql """ INSERT INTO ${tableName} VALUES(252, 120939.11130, 
"${generateString(252)}", "laooq", "2030-01-02", "2020-01-01 12:36:38", 252, 
"7022-01-01", 0, 90696620686827832.374, [0], null) """
+            sql """ INSERT INTO ${tableName} VALUES(298, 120939.11130, 
"${generateString(298)}", "laooq", "2030-01-02", "2020-01-01 12:36:38", 298, 
"7022-01-01", 1, 90696620686827832.374, [], []) """
 
             def result1 = connect(user=user, password=password, 
url=prepare_url) {
                 def stmt = prepareStatement "select /*+ 
SET_VAR(enable_nereids_planner=false) */ * from ${tableName} where k1 = ? and 
k2 = ? and k3 = ?"
@@ -195,13 +195,13 @@ suite("test_point_query") {
                 ALTER table ${tableName} ADD COLUMN new_column0 INT default 
"0";
                 """
                 sleep(1);
-                nprep_sql """ INSERT INTO ${tableName} VALUES(1235, 
120939.11130, "a    ddd", "laooq", "2030-01-02", "2020-01-01 12:36:38", 22.822, 
"7022-01-01 11:30:38", 1, 1.1111299, [119291.19291], ["111", "222", "333"], 1) 
"""
+                nprep_sql """ INSERT INTO ${tableName} VALUES(1235, 
120939.11130, "a    ddd", "laooq", "2030-01-02", "2020-01-01 12:36:38", 22.822, 
"7022-01-01", 1, 1.1111299, [119291.19291], ["111", "222", "333"], 1) """
                 stmt.setBigDecimal(1, new BigDecimal("120939.11130"))
                 stmt.setString(2, "a    ddd")
                 qe_point_select stmt
                 qe_point_select stmt
                 // invalidate cache
-                nprep_sql """ INSERT INTO ${tableName} VALUES(1235, 
120939.11130, "a    ddd", "xxxxxx", "2030-01-02", "2020-01-01 12:36:38", 
22.822, "7022-01-01 11:30:38", 0, 1929111.1111,[119291.19291], ["111", "222", 
"333"], 2) """
+                nprep_sql """ INSERT INTO ${tableName} VALUES(1235, 
120939.11130, "a    ddd", "xxxxxx", "2030-01-02", "2020-01-01 12:36:38", 
22.822, "7022-01-01", 0, 1929111.1111,[119291.19291], ["111", "222", "333"], 2) 
"""
                 qe_point_select stmt
                 qe_point_select stmt
                 qe_point_select stmt
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 b6f1fea75db..0c7b47f087d 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
@@ -325,7 +325,7 @@ suite("test_date_function") {
     qt_sql """ select datediff(CAST('2007-12-31 23:59:59' AS DATETIME), 
CAST('2007-12-30' AS DATETIME)) """
     qt_sql """ select datediff(CAST('2010-11-30 23:59:59' AS DATETIME), 
CAST('2010-12-31' AS DATETIME)) """
     qt_sql """ select datediff('2010-10-31', '2010-10-15') """
-    qt_sql """ select datediff('10000-10-31', '2010-10-15') from ${tableName}; 
"""
+    qt_sql """ select datediff('1000-10-31', '2010-10-15') from ${tableName}; 
"""
 
     // DAY
     qt_sql """ select day('1987-01-31') """
@@ -678,7 +678,7 @@ suite("test_date_function") {
         ('2022-01-01', '2022-01-01', '2022-01-01 00:00:00', '2022-01-01 
00:00:00'), 
         ('2000-02-01', '2000-02-01', '2000-02-01 00:00:00', '2000-02-01 
00:00:00.123'), 
         ('2022-02-27', '2022-02-27', '2022-02-27 00:00:00', '2022-02-27 
00:00:00'),
-        ('2022-02-28', '2022-02-28', '2022-02-28T23:59:59', 
'2022-02-28T23:59:59');"""
+        ('2022-02-28', '2022-02-28', '2022-02-28 23:59:59', '2022-02-28 
23:59:59');"""
     qt_sql """
         select last_day(birth), last_day(birth1), 
                 last_day(birth2), last_day(birth3) 


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

Reply via email to