You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2024/04/12 07:10:04 UTC

(doris) 18/27: [chore](test) remove some outdated datetime test case (#33476)

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

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

commit d2f84229ec77715072c32522696183e0e1fcb2de
Author: morrySnow <10...@users.noreply.github.com>
AuthorDate: Thu Apr 11 10:32:09 2024 +0800

    [chore](test) remove some outdated datetime test case (#33476)
---
 .../datatype_p0/datetimev1/test_datetimev1_calc.out    | 18 ------------------
 .../data/datatype_p0/datetimev2/test_invalid_hour.out  |  1 -
 .../data/datatype_p0/datetimev2/test_timezone.out      |  3 ---
 .../datatype_p0/datetimev1/test_datetimev1_calc.groovy | 10 ++--------
 .../datatype_p0/datetimev2/test_invalid_hour.groovy    | 10 ++++------
 .../suites/datatype_p0/datetimev2/test_timezone.groovy |  5 ++---
 6 files changed, 8 insertions(+), 39 deletions(-)

diff --git a/regression-test/data/datatype_p0/datetimev1/test_datetimev1_calc.out b/regression-test/data/datatype_p0/datetimev1/test_datetimev1_calc.out
index bc11bd0a172..c65fb327152 100644
--- a/regression-test/data/datatype_p0/datetimev1/test_datetimev1_calc.out
+++ b/regression-test/data/datatype_p0/datetimev1/test_datetimev1_calc.out
@@ -3,38 +3,20 @@
 \N	2010-10-09T19:20:21	\N
 1	2010-10-01T11:12:13	2010-10-02T22:22:22
 2	2010-10-02T12:13:14	2010-10-02T22:22:22
-3	2010-10-03T13:14:15	\N
-4	2010-10-04T14:24:34	\N
 5	2010-10-05T15:35:45	2010-10-06T16:16:16
-6	\N	\N
-7	2010-10-07T23:21:20	\N
 8	\N	\N
-9	\N	\N
-10	\N	\N
 
 -- !select_calc1 --
 \N	2010-10-09T19:20:21	\N	2010-10-14T19:20:21	\N
 1	2010-10-01T11:12:13	2010-10-02T22:22:22	2010-10-06T11:12:13	2010-09-22T22:22:22
 2	2010-10-02T12:13:14	2010-10-02T22:22:22	2010-10-07T12:13:14	2010-09-22T22:22:22
-3	2010-10-03T13:14:15	\N	2010-10-08T13:14:15	\N
-4	2010-10-04T14:24:34	\N	2010-10-09T14:24:34	\N
 5	2010-10-05T15:35:45	2010-10-06T16:16:16	2010-10-10T15:35:45	2010-09-26T16:16:16
-6	\N	\N	\N	\N
-7	2010-10-07T23:21:20	\N	2010-10-12T23:21:20	\N
 8	\N	\N	\N	\N
-9	\N	\N	\N	\N
-10	\N	\N	\N	\N
 
 -- !select_calc2 --
 \N	2010-10-09T19:20:21	\N	2010-10-09	2010-10-09	\N	\N
 1	2010-10-01T11:12:13	2010-10-02T22:22:22	2010-10-01	2010-10-01	2010-10-02T22:22:22	2010-10-02T22:22:22
 2	2010-10-02T12:13:14	2010-10-02T22:22:22	2010-10-02	2010-10-02	2010-10-02T22:22:22	2010-10-02T22:22:22
-3	2010-10-03T13:14:15	\N	2010-10-03	2010-10-03	\N	\N
-4	2010-10-04T14:24:34	\N	2010-10-04	2010-10-04	\N	\N
 5	2010-10-05T15:35:45	2010-10-06T16:16:16	2010-10-05	2010-10-05	2010-10-06T16:16:16	2010-10-06T16:16:16
-6	\N	\N	\N	\N	\N	\N
-7	2010-10-07T23:21:20	\N	2010-10-07	2010-10-07	\N	\N
 8	\N	\N	\N	\N	\N	\N
-9	\N	\N	\N	\N	\N	\N
-10	\N	\N	\N	\N	\N	\N
 
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..886c0af0798 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,6 @@
 \N
 
 -- !sql --
-1	2023-12-12 24:00:00	\N	\N
 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..6f1c4b22df6 100644
--- a/regression-test/data/datatype_p0/datetimev2/test_timezone.out
+++ b/regression-test/data/datatype_p0/datetimev2/test_timezone.out
@@ -12,10 +12,7 @@
 -- !nereids --
 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/suites/datatype_p0/datetimev1/test_datetimev1_calc.groovy b/regression-test/suites/datatype_p0/datetimev1/test_datetimev1_calc.groovy
index 399d49bc94a..0ae497cb6bb 100644
--- a/regression-test/suites/datatype_p0/datetimev1/test_datetimev1_calc.groovy
+++ b/regression-test/suites/datatype_p0/datetimev1/test_datetimev1_calc.groovy
@@ -44,15 +44,9 @@ suite("test_datetimev1_calc", "nonConcurrent") {
     sql """insert into ${table1} values
             (1, '2010-10-01 11:12:13', '2010-10-02 22:22:22'),
             (2, '2010-10-02 12:13:14', '2010-10-02 22:22:22'),
-            (3, '2010-10-03 13:14:15', '2010-10-03 33:33:33'),
-            (4, '2010-10-04 14:24:34', '2010-10-04 44:44:44'),
             (5, '2010-10-05 15:35:45', '2010-10-06 16:16:16'),
-            (6, '2010-10-06 44:45:46', '2010-10-06 55:56:57'),
-            (7, '2010-10-07 23:21:20', '2010-10-08 30:31:34'),
-            (8, null, null),
-            (9, null, '2010-10-09 44:46:48'),
-            (null, '2010-10-09 19:20:21', null),
-            (10, null, '2010-10-10 51:31:21');
+            (8, null, null), 
+            (null, '2010-10-09 19:20:21', null)
     """
     qt_select_all "select * from ${table1} order by 1, 2, 3"
 
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..3437557680d 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,6 @@ 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"),
             (2, "2023-12-12 23:00:00", "2023-12-12 23:00:00")
     """
 
@@ -67,17 +66,16 @@ suite("test_invalid_hour") {
             (1, "2023-12-12 23:00:00", "2023-12-12 23:00:00")
     """
 
-    try {
+    test {
         sql """ set enable_insert_strict = true; """
         
         sql """
             insert into test_invalid_hour_not_null values
                 (2, "2023-12-12 24:00:00", "2023-12-12 24:00:00")
         """
-    } catch (Exception e) {
-                logger.info("exception: " + e)
-                assertTrue(e.toString().contains("Insert has filtered data in strict mode"))
-            }
+        exception ""
+
+    }
     
     qt_sql """
         select *, cast(str as Datetime) from test_invalid_hour_null order by rowid;
diff --git a/regression-test/suites/datatype_p0/datetimev2/test_timezone.groovy b/regression-test/suites/datatype_p0/datetimev2/test_timezone.groovy
index c15404bf023..c1b63567d69 100644
--- a/regression-test/suites/datatype_p0/datetimev2/test_timezone.groovy
+++ b/regression-test/suites/datatype_p0/datetimev2/test_timezone.groovy
@@ -50,11 +50,10 @@ suite("test_timezone") {
     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 """ set enable_nereids_planner = false """ // TODO remove it after nereids support this format
     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 """ set enable_nereids_planner = true """
     qt_nereids "select * from ${table} order by k1"
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org