Skip to content

Commit 9131096

Browse files
committed
add test
Signed-off-by: jayzhan211 <jayzhan211@gmail.com>
1 parent 93dc4e4 commit 9131096

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

datafusion/sqllogictest/test_files/array.slt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3552,6 +3552,28 @@ select 1 || make_array(2, 3, 4), 1.0 || make_array(2.0, 3.0, 4.0), 'h' || make_a
35523552
----
35533553
[1, 2, 3, 4] [1.0, 2.0, 3.0, 4.0] [h, e, l, l, o]
35543554

3555+
# array concatenate operator with scalars #4 (mixed)
3556+
query ?
3557+
select 0 || [1,2,3] || 4 || [5] || [6,7];
3558+
----
3559+
[0, 1, 2, 3, 4, 5, 6, 7]
3560+
3561+
# array concatenate operator with nd-list #5 (mixed)
3562+
query ?
3563+
select 0 || [1,2,3] || [[4,5]] || [[6,7,8]] || [9,10];
3564+
----
3565+
[[0, 1, 2, 3], [4, 5], [6, 7, 8], [9, 10]]
3566+
3567+
# array concatenate operator non-valid cases
3568+
## concat 2D with scalar is not valid
3569+
query error
3570+
select 0 || [1,2,3] || [[4,5]] || [[6,7,8]] || [9,10] || 11;
3571+
3572+
## concat scalar with 2D is not valid
3573+
query error
3574+
select 0 || [[1,2,3]];
3575+
3576+
35553577
## array containment operator
35563578

35573579
# array containment operator with scalars #1 (at arrow)

0 commit comments

Comments
 (0)