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

dataroaring 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 79f6f85cf1f [FIX](serde)fix datetimev2 serde parse from string with 
scale (#27965)
79f6f85cf1f is described below

commit 79f6f85cf1f5222e9694f25e7ea901f73cfa80b7
Author: amory <wangqian...@selectdb.com>
AuthorDate: Tue Dec 5 13:58:32 2023 +0800

    [FIX](serde)fix datetimev2 serde parse from string with scale (#27965)
---
 .../serde/data_type_datetimev2_serde.cpp           |  2 +-
 .../test_nestedtypes_csv_insert_into_with_s3.out   | 10 +--
 .../test_nestedtypes_json_insert_into_with_s3.out  | 10 +--
 .../array_functions/test_array_with_scale_type.csv |  2 +
 .../array_functions/test_array_with_scale_type.out | 74 ++++++++++++++++++++++
 .../test_array_with_scale_type.groovy              | 22 +++++++
 6 files changed, 109 insertions(+), 11 deletions(-)

diff --git a/be/src/vec/data_types/serde/data_type_datetimev2_serde.cpp 
b/be/src/vec/data_types/serde/data_type_datetimev2_serde.cpp
index a5ed3dee0b5..d0839d2c9b0 100644
--- a/be/src/vec/data_types/serde/data_type_datetimev2_serde.cpp
+++ b/be/src/vec/data_types/serde/data_type_datetimev2_serde.cpp
@@ -82,7 +82,7 @@ Status 
DataTypeDateTimeV2SerDe::deserialize_one_cell_from_json(IColumn& column,
         }
 
     } else if (ReadBuffer rb(slice.data, slice.size);
-               !read_datetime_v2_text_impl<UInt64>(val, rb)) {
+               !read_datetime_v2_text_impl<UInt64>(val, rb, scale)) {
         return Status::InvalidArgument("parse date fail, string: '{}'",
                                        std::string(rb.position(), 
rb.count()).c_str());
     }
diff --git 
a/regression-test/data/datatype_p0/nested_types/query/test_nestedtypes_csv_insert_into_with_s3.out
 
b/regression-test/data/datatype_p0/nested_types/query/test_nestedtypes_csv_insert_into_with_s3.out
index 68c0e62b09a..6ff922a4a00 100644
--- 
a/regression-test/data/datatype_p0/nested_types/query/test_nestedtypes_csv_insert_into_with_s3.out
+++ 
b/regression-test/data/datatype_p0/nested_types/query/test_nestedtypes_csv_insert_into_with_s3.out
@@ -3,31 +3,31 @@
 0      
[true,false,true,true,true,false,false,false,false,false,false,true,true,true,false,true,true,false,true,false,false,true,false,true,false,true,true,false,true,false,true,false,false,false,true,false,false,true,true,false,true,false,false,true,true,true,true,false,true,false,true,false,false,false,false,true,true,true,false,true,true,false,true,true,true,false,true,false,true,true,true,true,true,true,true,true,false,true,true,false,true,false,false,true,true,false,false,false,false,fal
 [...]
 
 -- !sql_arr_csv_as_json_doris --
-0      [1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 
1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 
0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 
1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1]    
[null, null, null, null, null, null, null, null, null, null, null, null, null, 
null, null, null, null, null, null, null, null, null, null, null, null, null, 
null, null, null, null, null, nu [...]
+0      [1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 
1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 
0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 
1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1]    
[null, null, null, null, null, null, null, null, null, null, null, null, null, 
null, null, null, null, null, null, null, null, null, null, null, null, null, 
null, null, null, null, null, nu [...]
 
 -- !sql_arr_csv_as_json_s3 --
 0      
[[false],[false],[],[false],[true],[true,true],[true],[true,true],[false],[],[false,false],[],[false,false],[],[],[false],[true,false],[false],[true,true],[],[true],[true,false],[true,true],[false],[],[false,false],[false,true],[true],[false],[false,false],[false,false],[true],[false],[true],[true],[true,false],[true,true],[],[],[true],[],[],[],[true],[false],[],[],[],[false,false],[false,false],[true],[],[],[],[true],[true,false],[],[false],[true,true],[true],[],[true],[false,false],[
 [...]
 
 -- !sql_arr_csv_as_json_doris --
-0      [[0], [0], [], [0], [1], [1, 1], [1], [1, 1], [0], [], [0, 0], [], [0, 
0], [], [], [0], [1, 0], [0], [1, 1], [], [1], [1, 0], [1, 1], [0], [], [0, 0], 
[0, 1], [1], [0], [0, 0], [0, 0], [1], [0], [1], [1], [1, 0], [1, 1], [], [], 
[1], [], [], [], [1], [0], [], [], [], [0, 0], [0, 0], [1], [], [], [], [1], 
[1, 0], [], [0], [1, 1], [1], [], [1], [0, 0], [1, 1], [1], [1], [1, 0], [], 
[1], [0], [], [0], [0], [0], [1, 1], [0], [], [0], [1], [1, 0], [0], [0], [0, 
1], [], [1], [0], [0], [], [0 [...]
+0      [[0], [0], [], [0], [1], [1, 1], [1], [1, 1], [0], [], [0, 0], [], [0, 
0], [], [], [0], [1, 0], [0], [1, 1], [], [1], [1, 0], [1, 1], [0], [], [0, 0], 
[0, 1], [1], [0], [0, 0], [0, 0], [1], [0], [1], [1], [1, 0], [1, 1], [], [], 
[1], [], [], [], [1], [0], [], [], [], [0, 0], [0, 0], [1], [], [], [], [1], 
[1, 0], [], [0], [1, 1], [1], [], [1], [0, 0], [1, 1], [1], [1], [1, 0], [], 
[1], [0], [], [0], [0], [0], [1, 1], [0], [], [0], [1], [1, 0], [0], [0], [0, 
1], [], [1], [0], [0], [], [0 [...]
 
 -- !sql_arr_csv_as_json_s3 --
 0      {"true":true,"false":false}     
{"69":-94,"101":-115,"-64":66,"-71":101,"0":38,"-49":-24,"88":45,"-98":20,"5":88,"120":25,"-59":-66,"-91":92,"-113":61,"-39":109,"-22":-103,"37":-56,"25":32,"-50":-52,"-8":60,"-76":-5,"93":48,"57":-119,"-127":34,"106":125,"-12":15,"84":-16,"61":68,"-72":33,"-44":0,"60":-107,"117":12,"102":-11,"-11":-12,"28":60,"-26":93,"21":122,"92":-52,"65":105,"-119":-1,"-4":10,"-23":93,"-55":-67,"-19":5,"41":46,"2":-3,"-83":-74,"-94":-54,"-47":109,"-42":53,"44":19,"-5":56
 [...]
 
 -- !sql_arr_csv_as_json_doris --
-0      {1:1, 0:0}      {69:-94, 101:-115, -64:66, -71:101, 0:38, -49:-24, 
88:45, -98:20, 5:88, 120:25, -59:-66, -91:92, -113:61, -39:109, -22:-103, 
37:-56, 25:32, -50:-52, -8:60, -76:-5, 93:48, 57:-119, -127:34, 106:125, 
-12:15, 84:-16, 61:68, -72:33, -44:0, 60:-107, 117:12, 102:-11, -11:-12, 28:60, 
-26:93, 21:122, 92:-52, 65:105, -119:-1, -4:10, -23:93, -55:-67, -19:5, 41:46, 
2:-3, -83:-74, -94:-54, -47:109, -42:53, 44:19, -5:56, 27:14, 54:124, -84:-69, 
86:-124, -20:9, 76:-39, 39:25, 98:7, -52:-1 [...]
+0      {1:1, 0:0}      {69:-94, 101:-115, -64:66, -71:101, 0:38, -49:-24, 
88:45, -98:20, 5:88, 120:25, -59:-66, -91:92, -113:61, -39:109, -22:-103, 
37:-56, 25:32, -50:-52, -8:60, -76:-5, 93:48, 57:-119, -127:34, 106:125, 
-12:15, 84:-16, 61:68, -72:33, -44:0, 60:-107, 117:12, 102:-11, -11:-12, 28:60, 
-26:93, 21:122, 92:-52, 65:105, -119:-1, -4:10, -23:93, -55:-67, -19:5, 41:46, 
2:-3, -83:-74, -94:-54, -47:109, -42:53, 44:19, -5:56, 27:14, 54:124, -84:-69, 
86:-124, -20:9, 76:-39, 39:25, 98:7, -52:-1 [...]
 
 -- !sql_arr_csv_as_json_s3 --
 
[{"true":true,"false":true},{"true":true,"false":true},{"true":true,"false":true},{"true":true,"false":true},{"true":true,"false":true},{"true":true,"false":true},{"true":true,"false":true},{"true":true,"false":true},{"true":true,"false":true},{"true":true,"false":true},{"true":true,"false":true},{"true":true,"false":true},{"true":true,"false":true},{"true":true,"false":true},{"true":true,"false":true},{"true":true,"false":true},{"true":true,"false":true},{"true":true,"false":true},{"tru
 [...]
 
 -- !sql_arr_csv_as_json_doris --
-[{1:1, 0:1}, {1:1, 0:1}, {1:1, 0:1}, {1:1, 0:1}, {1:1, 0:1}, {1:1, 0:1}, {1:1, 
0:1}, {1:1, 0:1}, {1:1, 0:1}, {1:1, 0:1}, {1:1, 0:1}, {1:1, 0:1}, {1:1, 0:1}, 
{1:1, 0:1}, {1:1, 0:1}, {1:1, 0:1}, {1:1, 0:1}, {1:1, 0:1}, {1:1, 0:1}, {1:1, 
0:1}, {1:1, 0:1}, {1:1, 0:1}, {1:1, 0:1}, {1:1, 0:1}, {1:1, 0:1}, {1:1, 0:1}, 
{1:1, 0:1}, {1:1, 0:1}, {1:1, 0:1}, {1:1, 0:1}, {1:1, 0:1}, {1:1, 0:1}, {1:1, 
0:1}, {1:1, 0:1}, {1:1, 0:1}, {1:1, 0:1}, {1:1, 0:1}, {1:1, 0:1}, {1:1, 0:1}, 
{1:1, 0:1}, {1:1, 0:1}, [...]
+[{1:1, 0:1}, {1:1, 0:1}, {1:1, 0:1}, {1:1, 0:1}, {1:1, 0:1}, {1:1, 0:1}, {1:1, 
0:1}, {1:1, 0:1}, {1:1, 0:1}, {1:1, 0:1}, {1:1, 0:1}, {1:1, 0:1}, {1:1, 0:1}, 
{1:1, 0:1}, {1:1, 0:1}, {1:1, 0:1}, {1:1, 0:1}, {1:1, 0:1}, {1:1, 0:1}, {1:1, 
0:1}, {1:1, 0:1}, {1:1, 0:1}, {1:1, 0:1}, {1:1, 0:1}, {1:1, 0:1}, {1:1, 0:1}, 
{1:1, 0:1}, {1:1, 0:1}, {1:1, 0:1}, {1:1, 0:1}, {1:1, 0:1}, {1:1, 0:1}, {1:1, 
0:1}, {1:1, 0:1}, {1:1, 0:1}, {1:1, 0:1}, {1:1, 0:1}, {1:1, 0:1}, {1:1, 0:1}, 
{1:1, 0:1}, {1:1, 0:1}, [...]
 
 -- !sql_arr_csv_as_json_s3 --
 {"true":[true,false,false],"false":[false,false,false]}        
{"-9223372036854775808":[-9223372036854775807,-9223372036854775807,-9223372036854775808],"9223372036854775807":[-9223372036854775807,-9223372036854775808,-9223372036854775808],"-9223372036854775807":[-9223372036854775807,-9223372036854775806,-9223372036854775806],"-9223372036854775806":[-9223372036854775806,9223372036854775807,9223372036854775807],"-9223372036854775805":[-9223372036854775807,-9223372036854775806,-9223372036854775805
 [...]
 
 -- !sql_arr_csv_as_json_doris --
-{1:[1, 0, 0], 0:[0, 0, 0]}     {-9223372036854775808:[-9223372036854775807, 
-9223372036854775807, -9223372036854775808], 
9223372036854775807:[-9223372036854775807, -9223372036854775808, 
-9223372036854775808], -9223372036854775807:[-9223372036854775807, 
-9223372036854775806, -9223372036854775806], 
-9223372036854775806:[-9223372036854775806, 9223372036854775807, 
9223372036854775807], -9223372036854775805:[-9223372036854775807, 
-9223372036854775806, -9223372036854775805]}      {632314.622:[400998.79 [...]
+{1:[1, 0, 0], 0:[0, 0, 0]}     {-9223372036854775808:[-9223372036854775807, 
-9223372036854775807, -9223372036854775808], 
9223372036854775807:[-9223372036854775807, -9223372036854775808, 
-9223372036854775808], -9223372036854775807:[-9223372036854775807, 
-9223372036854775806, -9223372036854775806], 
-9223372036854775806:[-9223372036854775806, 9223372036854775807, 
9223372036854775807], -9223372036854775805:[-9223372036854775807, 
-9223372036854775806, -9223372036854775805]}      {632314.622:[400998.79 [...]
 
 -- !sql_arr --
 100
diff --git 
a/regression-test/data/datatype_p0/nested_types/query/test_nestedtypes_json_insert_into_with_s3.out
 
b/regression-test/data/datatype_p0/nested_types/query/test_nestedtypes_json_insert_into_with_s3.out
index 612c478feae..bc783a2eb02 100644
--- 
a/regression-test/data/datatype_p0/nested_types/query/test_nestedtypes_json_insert_into_with_s3.out
+++ 
b/regression-test/data/datatype_p0/nested_types/query/test_nestedtypes_json_insert_into_with_s3.out
@@ -3,31 +3,31 @@
 0      
[false,true,false,true,true,true,false,false,false,false,false,true,true,true,false,false,true,true,true,false,false,false,false,true,false,true,true,false,true,false,true,false,true,false,true,true,false,false,true,true,false,false,true,true,false,true,false,true,true,false,false,true,true,false,false,true,true,true,true,false,false,false,false,false,false,false,true,true,true,true,false,true,false,true,true,true,true,false,false,false,true,true,true,false,true,false,false,false,false
 [...]
 
 -- !sql_arr_json_without_quote_doris --
-0      [0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 
1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 
0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 
1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1]    
[null, null, null, null, null, null, null, null, null, null, null, null, null, 
null, null, null, null, null, null, null, null, null, null, null, null, null, 
null, null, null, null, null, nu [...]
+0      [0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 
1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 
0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 
1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1]    
[null, null, null, null, null, null, null, null, null, null, null, null, null, 
null, null, null, null, null, null, null, null, null, null, null, null, null, 
null, null, null, null, null, nu [...]
 
 -- !sql_arr_json_without_quote_s3 --
 0      
[[false,true],[true,true],[false,false],[],[false],[false],[],[],[],[false,false],[],[],[true],[true],[false],[true],[true],[],[true,false],[],[],[false],[false],[],[true,false],[false,true],[],[false,false],[true,false],[false,true],[false,false],[],[],[true],[true],[true],[],[],[false,true],[false,false],[],[],[true,false],[false],[false],[true],[],[],[],[true],[false,false],[true,false],[false,false],[false],[false,true],[],[false],[false,true],[false,false],[],[false],[true],[],[],
 [...]
 
 -- !sql_arr_json_without_quote_doris --
-0      [[0, 1], [1, 1], [0, 0], [], [0], [0], [], [], [], [0, 0], [], [], [1], 
[1], [0], [1], [1], [], [1, 0], [], [], [0], [0], [], [1, 0], [0, 1], [], [0, 
0], [1, 0], [0, 1], [0, 0], [], [], [1], [1], [1], [], [], [0, 1], [0, 0], [], 
[], [1, 0], [0], [0], [1], [], [], [], [1], [0, 0], [1, 0], [0, 0], [0], [0, 
1], [], [0], [0, 1], [0, 0], [], [0], [1], [], [], [], [1, 0], [], [], [1], 
[1], [], [], [1, 0], [1, 0], [0, 0], [], [], [0, 0], [0, 1], [1], [1], [1], [1, 
0], [1], [], [0, 0], [], [0, [...]
+0      [[0, 1], [1, 1], [0, 0], [], [0], [0], [], [], [], [0, 0], [], [], [1], 
[1], [0], [1], [1], [], [1, 0], [], [], [0], [0], [], [1, 0], [0, 1], [], [0, 
0], [1, 0], [0, 1], [0, 0], [], [], [1], [1], [1], [], [], [0, 1], [0, 0], [], 
[], [1, 0], [0], [0], [1], [], [], [], [1], [0, 0], [1, 0], [0, 0], [0], [0, 
1], [], [0], [0, 1], [0, 0], [], [0], [1], [], [], [], [1, 0], [], [], [1], 
[1], [], [], [1, 0], [1, 0], [0, 0], [], [], [0, 0], [0, 1], [1], [1], [1], [1, 
0], [1], [], [0, 0], [], [0, [...]
 
 -- !sql_arr_json_without_quote_s3 --
 0      {"false":true,"true":true}      
{"-64":-114,"5":87,"-128":-34,"-59":100,"-54":-124,"-91":2,"-7":14,"-96":-88,"25":6,"-108":91,"46":89,"93":6,"-3":-21,"78":118,"29":103,"-127":5,"106":75,"121":-63,"84":-107,"-104":-53,"61":-14,"-44":98,"6":-50,"60":-120,"117":86,"38":50,"70":45,"33":39,"65":-43,"-119":-115,"-4":-68,"-36":80,"9":36,"53":95,"-55":-70,"77":115,"-19":-63,"13":60,"-51":23,"41":109,"73":-82,"32":-47,"34":122,"-42":-16,"44":17,"118":-103,"-101":14,"39":31,"-52":-98,"-106":-85,"48":
 [...]
 
 -- !sql_arr_json_without_quote_doris --
-0      {0:1, 1:1}      {-64:-114, 5:87, -128:-34, -59:100, -54:-124, -91:2, 
-7:14, -96:-88, 25:6, -108:91, 46:89, 93:6, -3:-21, 78:118, 29:103, -127:5, 
106:75, 121:-63, 84:-107, -104:-53, 61:-14, -44:98, 6:-50, 60:-120, 117:86, 
38:50, 70:45, 33:39, 65:-43, -119:-115, -4:-68, -36:80, 9:36, 53:95, -55:-70, 
77:115, -19:-63, 13:60, -51:23, 41:109, 73:-82, 32:-47, 34:122, -42:-16, 44:17, 
118:-103, -101:14, 39:31, -52:-98, -106:-85, 48:126, 63:92, -46:1, -1:-89, 
16:-38, -14:97, -21:-69, 11:-6, 72:57, -3 [...]
+0      {0:1, 1:1}      {-64:-114, 5:87, -128:-34, -59:100, -54:-124, -91:2, 
-7:14, -96:-88, 25:6, -108:91, 46:89, 93:6, -3:-21, 78:118, 29:103, -127:5, 
106:75, 121:-63, 84:-107, -104:-53, 61:-14, -44:98, 6:-50, 60:-120, 117:86, 
38:50, 70:45, 33:39, 65:-43, -119:-115, -4:-68, -36:80, 9:36, 53:95, -55:-70, 
77:115, -19:-63, 13:60, -51:23, 41:109, 73:-82, 32:-47, 34:122, -42:-16, 44:17, 
118:-103, -101:14, 39:31, -52:-98, -106:-85, 48:126, 63:92, -46:1, -1:-89, 
16:-38, -14:97, -21:-69, 11:-6, 72:57, -3 [...]
 
 -- !sql_arr_json_without_quote_s3 --
 0      
[{"false":true,"true":false},{"false":true,"true":false},{"false":true,"true":false},{"false":true,"true":false},{"false":true,"true":false},{"false":true,"true":false},{"false":true,"true":false},{"false":true,"true":false},{"false":true,"true":false},{"false":true,"true":false},{"false":true,"true":false},{"false":true,"true":false},{"false":true,"true":false},{"false":true,"true":false},{"false":true,"true":false},{"false":true,"true":false},{"false":true,"true":false},{"false":true
 [...]
 
 -- !sql_arr_json_without_quote_doris --
-0      [{0:1, 1:0}, {0:1, 1:0}, {0:1, 1:0}, {0:1, 1:0}, {0:1, 1:0}, {0:1, 
1:0}, {0:1, 1:0}, {0:1, 1:0}, {0:1, 1:0}, {0:1, 1:0}, {0:1, 1:0}, {0:1, 1:0}, 
{0:1, 1:0}, {0:1, 1:0}, {0:1, 1:0}, {0:1, 1:0}, {0:1, 1:0}, {0:1, 1:0}, {0:1, 
1:0}, {0:1, 1:0}, {0:1, 1:0}, {0:1, 1:0}, {0:1, 1:0}, {0:1, 1:0}, {0:1, 1:0}, 
{0:1, 1:0}, {0:1, 1:0}, {0:1, 1:0}, {0:1, 1:0}, {0:1, 1:0}, {0:1, 1:0}, {0:1, 
1:0}, {0:1, 1:0}, {0:1, 1:0}, {0:1, 1:0}, {0:1, 1:0}, {0:1, 1:0}, {0:1, 1:0}, 
{0:1, 1:0}, {0:1, 1:0}, {0:1, 1:0 [...]
+0      [{0:1, 1:0}, {0:1, 1:0}, {0:1, 1:0}, {0:1, 1:0}, {0:1, 1:0}, {0:1, 
1:0}, {0:1, 1:0}, {0:1, 1:0}, {0:1, 1:0}, {0:1, 1:0}, {0:1, 1:0}, {0:1, 1:0}, 
{0:1, 1:0}, {0:1, 1:0}, {0:1, 1:0}, {0:1, 1:0}, {0:1, 1:0}, {0:1, 1:0}, {0:1, 
1:0}, {0:1, 1:0}, {0:1, 1:0}, {0:1, 1:0}, {0:1, 1:0}, {0:1, 1:0}, {0:1, 1:0}, 
{0:1, 1:0}, {0:1, 1:0}, {0:1, 1:0}, {0:1, 1:0}, {0:1, 1:0}, {0:1, 1:0}, {0:1, 
1:0}, {0:1, 1:0}, {0:1, 1:0}, {0:1, 1:0}, {0:1, 1:0}, {0:1, 1:0}, {0:1, 1:0}, 
{0:1, 1:0}, {0:1, 1:0}, {0:1, 1:0 [...]
 
 -- !sql_arr_json_without_quote_s3 --
 0      {"true":[true,false,false],"false":[false,true,false]}  
{"101":[-38,-115,35],"-59":[-113,-128,110],"10":[-78,-127,16],"56":[108,-40,124],"-22":[-63,-88,-24],"37":[-7,81,-20],"14":[-114,95,-3],"110":[71,-72,-84],"125":[1,110,56],"-40":[-13,19,80],"20":[-41,-115,107],"46":[82,-104,-30],"57":[116,68,88],"-104":[-64,119,31],"-72":[-65,-44,27],"1":[-127,-73,81],"74":[81,-82,-32],"-99":[-70,37,55],"60":[89,112,124],"-58":[-69,50,-56],"102":[27,-17,-9],"-68":[-112,20,91],"-43":[75,21,76],"33":
 [...]
 
 -- !sql_arr_json_without_quote_doris --
-0      {1:[1, 0, 0], 0:[0, 1, 0]}      {101:[-38, -115, 35], -59:[-113, -128, 
110], 10:[-78, -127, 16], 56:[108, -40, 124], -22:[-63, -88, -24], 37:[-7, 81, 
-20], 14:[-114, 95, -3], 110:[71, -72, -84], 125:[1, 110, 56], -40:[-13, 19, 
80], 20:[-41, -115, 107], 46:[82, -104, -30], 57:[116, 68, 88], -104:[-64, 119, 
31], -72:[-65, -44, 27], 1:[-127, -73, 81], 74:[81, -82, -32], -99:[-70, 37, 
55], 60:[89, 112, 124], -58:[-69, 50, -56], 102:[27, -17, -9], -68:[-112, 20, 
91], -43:[75, 21, 76], 33:[103, 6 [...]
+0      {1:[1, 0, 0], 0:[0, 1, 0]}      {101:[-38, -115, 35], -59:[-113, -128, 
110], 10:[-78, -127, 16], 56:[108, -40, 124], -22:[-63, -88, -24], 37:[-7, 81, 
-20], 14:[-114, 95, -3], 110:[71, -72, -84], 125:[1, 110, 56], -40:[-13, 19, 
80], 20:[-41, -115, 107], 46:[82, -104, -30], 57:[116, 68, 88], -104:[-64, 119, 
31], -72:[-65, -44, 27], 1:[-127, -73, 81], 74:[81, -82, -32], -99:[-70, 37, 
55], 60:[89, 112, 124], -58:[-69, 50, -56], 102:[27, -17, -9], -68:[-112, 20, 
91], -43:[75, 21, 76], 33:[103, 6 [...]
 
 -- !sql_arr --
 100
diff --git 
a/regression-test/data/query_p0/sql_functions/array_functions/test_array_with_scale_type.csv
 
b/regression-test/data/query_p0/sql_functions/array_functions/test_array_with_scale_type.csv
new file mode 100644
index 00000000000..a14f2b3fd6e
--- /dev/null
+++ 
b/regression-test/data/query_p0/sql_functions/array_functions/test_array_with_scale_type.csv
@@ -0,0 +1,2 @@
+3|"2022-12-01 22:23:24.999999"|22.6789|33.6789|["2022-12-01 
22:23:24.999999","2022-12-01 
23:23:24.999999"]|[22.6789,33.6789]|[22.6789,33.6789]
+4|"2022-12-02 22:23:24.999999"|23.6789|34.6789|["2022-12-02 
22:23:24.999999","2022-12-02 
23:23:24.999999"]|[23.6789,34.6789]|[22.6789,34.6789]
diff --git 
a/regression-test/data/query_p0/sql_functions/array_functions/test_array_with_scale_type.out
 
b/regression-test/data/query_p0/sql_functions/array_functions/test_array_with_scale_type.out
index a9535841216..7f76b283eb3 100644
--- 
a/regression-test/data/query_p0/sql_functions/array_functions/test_array_with_scale_type.out
+++ 
b/regression-test/data/query_p0/sql_functions/array_functions/test_array_with_scale_type.out
@@ -8,6 +8,8 @@
 -- !select --
 2022-12-01T22:23:25
 2022-12-02T22:23:25
+2022-12-01T22:23:25
+2022-12-02T22:23:25
 
 -- !select --
 2022-12-02T22:23:24.999999
@@ -18,6 +20,8 @@
 -- !select --
 2022-12-01T23:23:25
 2022-12-02T23:23:25
+2022-12-01T23:23:25
+2022-12-02T23:23:25
 
 -- !select --
 23
@@ -31,10 +35,14 @@
 -- !select --
 22.679
 23.679
+22.679
+23.679
 
 -- !select --
 22.679
 22.679
+22.679
+22.679
 
 -- !select --
 23
@@ -48,18 +56,26 @@
 -- !select --
 33.679
 34.679
+33.679
+34.679
 
 -- !select --
 33.679
 34.679
+33.679
+34.679
 
 -- !select --
 [22.679]
 [23.679]
+[22.679]
+[23.679]
 
 -- !select --
 [24.990, 25.990]
 [24.990, 25.990]
+[24.990, 25.990]
+[24.990, 25.990]
 
 -- !select --
 [24.990, 25.990]
@@ -67,21 +83,29 @@
 -- !select --
 [33.679]
 [34.679]
+[33.679]
+[34.679]
 
 -- !select --
 [24.990, 25.990]
 [24.990, 25.990]
+[24.990, 25.990]
+[24.990, 25.990]
 
 -- !select --
 [24.990, 25.990]
 
 -- !select --
+[null]
+[null]
 ["2022-12-01 22:23:25.000"]
 ["2022-12-02 22:23:25.000"]
 
 -- !select --
 ["2022-12-02 22:23:25.000", "2022-12-02 22:23:23.998"]
 ["2022-12-02 22:23:25.000", "2022-12-02 22:23:23.998"]
+["2022-12-02 22:23:25.000", "2022-12-02 22:23:23.998"]
+["2022-12-02 22:23:25.000", "2022-12-02 22:23:23.998"]
 
 -- !select --
 ["2022-12-02 22:23:25", "2022-12-02 22:23:23.998"]
@@ -89,98 +113,146 @@
 -- !select --
 []
 []
+[]
+[]
 
 -- !select --
 ["2022-12-01 22:23:25.000000", "2022-12-01 23:23:25.000000"]
 ["2022-12-02 22:23:25.000000", "2022-12-02 23:23:25.000000"]
+["2022-12-01 22:23:25.000000", "2022-12-01 23:23:25.000000"]
+["2022-12-02 22:23:25.000000", "2022-12-02 23:23:25.000000"]
 
 -- !select --
 \N
 \N
+\N
+\N
 
 -- !select --
 [22.679]
 []
+[22.679]
+[]
 
 -- !select --
 [22.679, 33.679]
 [23.679, 34.679]
+[22.679, 33.679]
+[23.679, 34.679]
 
 -- !select --
 \N
 \N
+\N
+\N
 
 -- !select --
 ["2022-12-02 22:23:24.123", "2022-12-02 22:23:23.123"]
 ["2022-12-02 22:23:24.123", "2022-12-02 22:23:23.123"]
+["2022-12-02 22:23:24.123", "2022-12-02 22:23:23.123"]
+["2022-12-02 22:23:24.123", "2022-12-02 22:23:23.123"]
 
 -- !select --
 ["2022-12-01 22:23:25.000", "2022-12-01 23:23:25.000"]
 ["2022-12-02 22:23:25.000", "2022-12-02 23:23:25.000"]
+["2022-12-01 22:23:25.000", "2022-12-01 23:23:25.000"]
+["2022-12-02 22:23:25.000", "2022-12-02 23:23:25.000"]
 
 -- !select --
 ["2022-12-01 22:23:25.000000", "2022-12-01 23:23:25.000000", "2022-12-02 
22:23:24.123000", "2022-12-02 22:23:23.123000"]
 ["2022-12-02 22:23:25.000000", "2022-12-02 23:23:25.000000", "2022-12-02 
22:23:24.123000", "2022-12-02 22:23:23.123000"]
+["2022-12-01 22:23:25.000000", "2022-12-01 23:23:25.000000", "2022-12-02 
22:23:24.123000", "2022-12-02 22:23:23.123000"]
+["2022-12-02 22:23:25.000000", "2022-12-02 23:23:25.000000", "2022-12-02 
22:23:24.123000", "2022-12-02 22:23:23.123000"]
 
 -- !select --
 [22.679, 33.679, 22.679, 33.679, 22.679, 33.679]
 [23.679, 34.679, 23.679, 34.679, 23.679, 34.679]
+[22.679, 33.679, 22.679, 33.679, 22.679, 33.679]
+[23.679, 34.679, 23.679, 34.679, 23.679, 34.679]
 
 -- !select --
 [{"1": 22.679, "2": 22.679, "3": "2022-12-01 22:23:25.000", "4": 22.679}, 
{"1": 33.679, "2": 33.679, "3": "2022-12-01 23:23:25.000", "4": 33.679}]
 [{"1": 23.679, "2": 23.679, "3": "2022-12-02 22:23:25.000", "4": 23.679}, 
{"1": 34.679, "2": 34.679, "3": "2022-12-02 23:23:25.000", "4": 34.679}]
+[{"1": 22.679, "2": 22.679, "3": "2022-12-01 22:23:25.000", "4": 22.679}, 
{"1": 33.679, "2": 33.679, "3": "2022-12-01 23:23:25.000", "4": 33.679}]
+[{"1": 23.679, "2": 23.679, "3": "2022-12-02 22:23:25.000", "4": 23.679}, 
{"1": 34.679, "2": 34.679, "3": "2022-12-02 23:23:25.000", "4": 34.679}]
 
 -- !select --
 [{"1": "2022-12-02 22:23:24.123"}, {"1": "2022-12-02 22:23:23.123"}]
 [{"1": "2022-12-02 22:23:24.123"}, {"1": "2022-12-02 22:23:23.123"}]
+[{"1": "2022-12-02 22:23:24.123"}, {"1": "2022-12-02 22:23:23.123"}]
+[{"1": "2022-12-02 22:23:24.123"}, {"1": "2022-12-02 22:23:23.123"}]
 
 -- !select --
 [{"1": "2022-12-01 22:23:25.000"}, {"1": "2022-12-01 23:23:25.000"}]
 [{"1": "2022-12-02 22:23:25.000"}, {"1": "2022-12-02 23:23:25.000"}]
+[{"1": "2022-12-01 22:23:25.000"}, {"1": "2022-12-01 23:23:25.000"}]
+[{"1": "2022-12-02 22:23:25.000"}, {"1": "2022-12-02 23:23:25.000"}]
 
 -- !select --
 [{"1": "2022-12-01 22:23:25.000", "2": "2022-12-02 22:23:24.123"}, {"1": 
"2022-12-01 23:23:25.000", "2": "2022-12-02 22:23:23.123"}]
 [{"1": "2022-12-02 22:23:25.000", "2": "2022-12-02 22:23:24.123"}, {"1": 
"2022-12-02 23:23:25.000", "2": "2022-12-02 22:23:23.123"}]
+[{"1": "2022-12-01 22:23:25.000", "2": "2022-12-02 22:23:24.123"}, {"1": 
"2022-12-01 23:23:25.000", "2": "2022-12-02 22:23:23.123"}]
+[{"1": "2022-12-02 22:23:25.000", "2": "2022-12-02 22:23:24.123"}, {"1": 
"2022-12-02 23:23:25.000", "2": "2022-12-02 22:23:23.123"}]
 
 -- !select --
 ["2022-12-02 22:23:23.123", "2022-12-02 22:23:24.123"]
 ["2022-12-02 22:23:23.123", "2022-12-02 22:23:24.123"]
+["2022-12-02 22:23:23.123", "2022-12-02 22:23:24.123"]
+["2022-12-02 22:23:23.123", "2022-12-02 22:23:24.123"]
 
 -- !select --
 ["2023-03-08 23:23:23.123", "2022-12-01 22:23:25.000", "2022-12-01 
23:23:25.000"]
 ["2023-03-08 23:23:23.123", "2022-12-02 22:23:25.000", "2022-12-02 
23:23:25.000"]
+["2023-03-08 23:23:23.123", "2022-12-01 22:23:25.000", "2022-12-01 
23:23:25.000"]
+["2023-03-08 23:23:23.123", "2022-12-02 22:23:25.000", "2022-12-02 
23:23:25.000"]
 
 -- !select --
+\N     ["2022-12-01 22:23:25.000", "2022-12-01 23:23:25.000"]  [null, 
"2022-12-01 22:23:25.000", "2022-12-01 23:23:25.000"]
+\N     ["2022-12-02 22:23:25.000", "2022-12-02 23:23:25.000"]  [null, 
"2022-12-02 22:23:25.000", "2022-12-02 23:23:25.000"]
 2022-12-01T22:23:25    ["2022-12-01 22:23:25.000", "2022-12-01 23:23:25.000"]  
["2022-12-01 22:23:25.000", "2022-12-01 22:23:25.000", "2022-12-01 
23:23:25.000"]
 2022-12-02T22:23:25    ["2022-12-02 22:23:25.000", "2022-12-02 23:23:25.000"]  
["2022-12-02 22:23:25.000", "2022-12-02 22:23:25.000", "2022-12-02 
23:23:25.000"]
 
 -- !select --
 [25.990, 22.679, 33.679]
 [25.990, 23.679, 34.679]
+[25.990, 22.679, 33.679]
+[25.990, 23.679, 34.679]
 
 -- !select --
 22.679 [22.679, 33.679]        [22.679, 22.679, 33.679]
 23.679 [23.679, 34.679]        [23.679, 23.679, 34.679]
+22.679 [22.679, 33.679]        [22.679, 22.679, 33.679]
+23.679 [23.679, 34.679]        [23.679, 23.679, 34.679]
 
 -- !select --
 ["2022-12-02 22:23:24.123", "2022-12-02 22:23:23.123"]
 ["2022-12-02 22:23:24.123", "2022-12-02 22:23:23.123"]
+["2022-12-02 22:23:24.123", "2022-12-02 22:23:23.123"]
+["2022-12-02 22:23:24.123", "2022-12-02 22:23:23.123"]
 
 -- !select --
 ["2022-12-01 22:23:25.000", "2022-12-01 23:23:25.000", "2023-03-08 
23:23:23.123"]
 ["2022-12-02 22:23:25.000", "2022-12-02 23:23:25.000", "2023-03-08 
23:23:23.123"]
+["2022-12-01 22:23:25.000", "2022-12-01 23:23:25.000", "2023-03-08 
23:23:23.123"]
+["2022-12-02 22:23:25.000", "2022-12-02 23:23:25.000", "2023-03-08 
23:23:23.123"]
 
 -- !select --
+\N     ["2022-12-01 22:23:25.000", "2022-12-01 23:23:25.000"]  ["2022-12-01 
22:23:25.000", "2022-12-01 23:23:25.000", null]
+\N     ["2022-12-02 22:23:25.000", "2022-12-02 23:23:25.000"]  ["2022-12-02 
22:23:25.000", "2022-12-02 23:23:25.000", null]
 2022-12-01T22:23:25    ["2022-12-01 22:23:25.000", "2022-12-01 23:23:25.000"]  
["2022-12-01 22:23:25.000", "2022-12-01 23:23:25.000", "2022-12-01 
22:23:25.000"]
 2022-12-02T22:23:25    ["2022-12-02 22:23:25.000", "2022-12-02 23:23:25.000"]  
["2022-12-02 22:23:25.000", "2022-12-02 23:23:25.000", "2022-12-02 
22:23:25.000"]
 
 -- !select --
 [22.679, 33.679, 25.990]
 [23.679, 34.679, 25.990]
+[22.679, 33.679, 25.990]
+[23.679, 34.679, 25.990]
 
 -- !select --
 22.679 [22.679, 33.679]        [22.679, 33.679, 22.679]
 23.679 [23.679, 34.679]        [23.679, 34.679, 23.679]
+22.679 [22.679, 33.679]        [22.679, 33.679, 22.679]
+23.679 [23.679, 34.679]        [23.679, 34.679, 23.679]
 
 -- !select --
 [23, 11]
@@ -194,4 +266,6 @@
 -- !select --
 [22.679, 56.358]
 [23.679, 58.358]
+[22.679, 56.358]
+[23.679, 58.358]
 
diff --git 
a/regression-test/suites/query_p0/sql_functions/array_functions/test_array_with_scale_type.groovy
 
b/regression-test/suites/query_p0/sql_functions/array_functions/test_array_with_scale_type.groovy
index 6cd4312b14e..5176bdf5fc3 100644
--- 
a/regression-test/suites/query_p0/sql_functions/array_functions/test_array_with_scale_type.groovy
+++ 
b/regression-test/suites/query_p0/sql_functions/array_functions/test_array_with_scale_type.groovy
@@ -37,6 +37,28 @@ suite("test_array_with_scale_type") {
         )
         """
 
+        // load with same insert into data
+        streamLoad {
+            table "${tableName}"
+
+            set 'column_separator', '|'
+
+            file 'test_array_with_scale_type.csv'
+            time 10000 // limit inflight 10s
+
+            check { result, exception, startTime, endTime ->
+                if (exception != null) {
+                    throw exception
+                }
+                log.info("Stream load result: ${result}".toString())
+                def json = parseJson(result)
+                assertEquals("success", json.Status.toLowerCase())
+                assertEquals(2, json.NumberTotalRows)
+                assertEquals(2, json.NumberLoadedRows)
+                assertEquals(0, json.NumberFilteredRows)
+                assertEquals(0, json.NumberUnselectedRows)
+            }
+        }
         sql """INSERT INTO ${tableName} values
         (1,"2022-12-01 22:23:24.999999",22.6789,33.6789,["2022-12-01 
22:23:24.999999","2022-12-01 
23:23:24.999999"],[22.6789,33.6789],[22.6789,33.6789]),
         (2,"2022-12-02 22:23:24.999999",23.6789,34.6789,["2022-12-02 
22:23:24.999999","2022-12-02 
23:23:24.999999"],[23.6789,34.6789],[22.6789,34.6789])


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

Reply via email to