@@ -3238,30 +3238,55 @@ select list_to_string(['h', 'e', 'l', 'l', 'o'], ','), list_to_string([1, 2, 3,
3238
3238
----
3239
3239
h,e,l,l,o 1-2-3-4-5 1|2|3
3240
3240
3241
+ query TTT
3242
+ select list_to_string(arrow_cast(['h', 'e', 'l', 'l', 'o'], 'LargeList(Utf8)'), ','), list_to_string(arrow_cast([1, 2, 3, 4, 5], 'LargeList(Int64)'), '-'), list_to_string(arrow_cast([1.0, 2.0, 3.0], 'LargeList(Float64)'), '|');
3243
+ ----
3244
+ h,e,l,l,o 1-2-3-4-5 1|2|3
3245
+
3241
3246
# array_join scalar function #5 (function alias `array_to_string`)
3242
3247
query TTT
3243
3248
select array_join(['h', 'e', 'l', 'l', 'o'], ','), array_join([1, 2, 3, 4, 5], '-'), array_join([1.0, 2.0, 3.0], '|');
3244
3249
----
3245
3250
h,e,l,l,o 1-2-3-4-5 1|2|3
3246
3251
3252
+ query TTT
3253
+ select array_join(arrow_cast(['h', 'e', 'l', 'l', 'o'], 'LargeList(Utf8)'), ','), array_join(arrow_cast([1, 2, 3, 4, 5], 'LargeList(Int64)'), '-'), array_join(arrow_cast([1.0, 2.0, 3.0], 'LargeList(Float64)'), '|');
3254
+ ----
3255
+ h,e,l,l,o 1-2-3-4-5 1|2|3
3256
+
3247
3257
# list_join scalar function #6 (function alias `list_join`)
3248
3258
query TTT
3249
3259
select list_join(['h', 'e', 'l', 'l', 'o'], ','), list_join([1, 2, 3, 4, 5], '-'), list_join([1.0, 2.0, 3.0], '|');
3250
3260
----
3251
3261
h,e,l,l,o 1-2-3-4-5 1|2|3
3252
3262
3263
+ query TTT
3264
+ select list_join(arrow_cast(['h', 'e', 'l', 'l', 'o'], 'LargeList(Utf8)'), ','), list_join(arrow_cast([1, 2, 3, 4, 5], 'LargeList(Int64)'), '-'), list_join(arrow_cast([1.0, 2.0, 3.0], 'LargeList(Float64)'), '|');
3265
+ ----
3266
+ h,e,l,l,o 1-2-3-4-5 1|2|3
3267
+
3253
3268
# array_to_string scalar function with nulls #1
3254
3269
query TTT
3255
3270
select array_to_string(make_array('h', NULL, 'l', NULL, 'o'), ','), array_to_string(make_array(1, NULL, 3, NULL, 5), '-'), array_to_string(make_array(NULL, 2.0, 3.0), '|');
3256
3271
----
3257
3272
h,l,o 1-3-5 2|3
3258
3273
3274
+ query TTT
3275
+ select array_to_string(arrow_cast(['h', 'e', 'l', 'l', 'o'], 'LargeList(Utf8)'), ','), array_to_string(arrow_cast([1, 2, 3, 4, 5], 'LargeList(Int64)'), '-'), array_to_string(arrow_cast([1.0, 2.0, 3.0], 'LargeList(Float64)'), '|');
3276
+ ----
3277
+ h,e,l,l,o 1-2-3-4-5 1|2|3
3278
+
3259
3279
# array_to_string scalar function with nulls #2
3260
3280
query TTT
3261
3281
select array_to_string(make_array('h', NULL, NULL, NULL, 'o'), ',', '-'), array_to_string(make_array(NULL, 2, NULL, 4, 5), '-', 'nil'), array_to_string(make_array(1.0, NULL, 3.0), '|', '0');
3262
3282
----
3263
3283
h,-,-,-,o nil-2-nil-4-5 1|0|3
3264
3284
3285
+ query TTT
3286
+ select array_to_string(arrow_cast(make_array('h', NULL, NULL, NULL, 'o'), 'LargeList(Utf8)'), ',', '-'), array_to_string(arrow_cast(make_array(NULL, 2, NULL, 4, 5), 'LargeList(Int64)'), '-', 'nil'), array_to_string(arrow_cast(make_array(1.0, NULL, 3.0), 'LargeList(Float64)'), '|', '0');
3287
+ ----
3288
+ h,-,-,-,o nil-2-nil-4-5 1|0|3
3289
+
3265
3290
# array_to_string with columns #1
3266
3291
3267
3292
# For reference
@@ -3288,6 +3313,18 @@ NULL
3288
3313
51^52^54^55^56^57^58^59^60
3289
3314
NULL
3290
3315
3316
+ query T
3317
+ select array_to_string(column1, column4) from large_arrays_values;
3318
+ ----
3319
+ 2,3,4,5,6,7,8,9,10
3320
+ 11.12.13.14.15.16.17.18.20
3321
+ 21-22-23-25-26-27-28-29-30
3322
+ 31ok32ok33ok34ok35ok37ok38ok39ok40
3323
+ NULL
3324
+ 41$42$43$44$45$46$47$48$49$50
3325
+ 51^52^54^55^56^57^58^59^60
3326
+ NULL
3327
+
3291
3328
query TT
3292
3329
select array_to_string(column1, '_'), array_to_string(make_array(1,2,3), '/') from arrays_values;
3293
3330
----
@@ -3300,6 +3337,18 @@ NULL 1/2/3
3300
3337
51_52_54_55_56_57_58_59_60 1/2/3
3301
3338
61_62_63_64_65_66_67_68_69_70 1/2/3
3302
3339
3340
+ query TT
3341
+ select array_to_string(column1, '_'), array_to_string(make_array(1,2,3), '/') from large_arrays_values;
3342
+ ----
3343
+ 2_3_4_5_6_7_8_9_10 1/2/3
3344
+ 11_12_13_14_15_16_17_18_20 1/2/3
3345
+ 21_22_23_25_26_27_28_29_30 1/2/3
3346
+ 31_32_33_34_35_37_38_39_40 1/2/3
3347
+ NULL 1/2/3
3348
+ 41_42_43_44_45_46_47_48_49_50 1/2/3
3349
+ 51_52_54_55_56_57_58_59_60 1/2/3
3350
+ 61_62_63_64_65_66_67_68_69_70 1/2/3
3351
+
3303
3352
query TT
3304
3353
select array_to_string(column1, '_', '*'), array_to_string(make_array(make_array(1,2,3)), '.') from arrays_values;
3305
3354
----
@@ -3312,6 +3361,18 @@ NULL 1.2.3
3312
3361
51_52_*_54_55_56_57_58_59_60 1.2.3
3313
3362
61_62_63_64_65_66_67_68_69_70 1.2.3
3314
3363
3364
+ query TT
3365
+ select array_to_string(column1, '_', '*'), array_to_string(make_array(make_array(1,2,3)), '.') from large_arrays_values;
3366
+ ----
3367
+ *_2_3_4_5_6_7_8_9_10 1.2.3
3368
+ 11_12_13_14_15_16_17_18_*_20 1.2.3
3369
+ 21_22_23_*_25_26_27_28_29_30 1.2.3
3370
+ 31_32_33_34_35_*_37_38_39_40 1.2.3
3371
+ NULL 1.2.3
3372
+ 41_42_43_44_45_46_47_48_49_50 1.2.3
3373
+ 51_52_*_54_55_56_57_58_59_60 1.2.3
3374
+ 61_62_63_64_65_66_67_68_69_70 1.2.3
3375
+
3315
3376
## cardinality
3316
3377
3317
3378
# cardinality scalar function
0 commit comments