Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1423,6 +1423,7 @@ && collectChildReturnTypes()[0].isDecimalV3()) {
|| fnName.getFunction().equalsIgnoreCase("array_slice")
|| fnName.getFunction().equalsIgnoreCase("array_popback")
|| fnName.getFunction().equalsIgnoreCase("array_popfront")
|| fnName.getFunction().equalsIgnoreCase("array_pushfront")
|| fnName.getFunction().equalsIgnoreCase("reverse")
|| fnName.getFunction().equalsIgnoreCase("%element_slice%")
|| fnName.getFunction().equalsIgnoreCase("array_concat")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1292,6 +1292,17 @@
8 \N
9 \N

-- !select --
1 [NULL, 111.111, 222.222]
2 [NULL, 3333.333, 4444.444]
3 \N
4 \N
5 \N
6 \N
7 \N
8 \N
9 \N

-- !select --
[1, 2, 3] 1,2,3
[4] 4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -749,3 +749,5 @@ _
-- !sql --
[2023-03-08 16:23:54.999, 2023-03-05 12:23:24.999, 2023-03-05 15:23:23.997]

-- !sql --
[333.333, 111.111, 222.222]
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ suite("test_array_functions") {
qt_select "SELECT k1, array_pushfront(k8, cast('2023-03-05' as datev2)) FROM ${tableName} ORDER BY k1"
qt_select "SELECT k1, array_pushfront(k10, cast('2023-03-08 10:30:00.999' as datetimev2(3))) FROM ${tableName} ORDER BY k1"
qt_select "SELECT k1, array_pushfront(k10, null) FROM ${tableName} ORDER BY k1"
qt_select "SELECT k1, array_pushfront(k12, null) FROM ${tableName} ORDER BY k1"

qt_select "select k2, bitmap_to_string(bitmap_from_array(k2)) from ${tableName} order by k1;"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ suite("test_array_functions_by_literal") {
qt_sql "select array_pushfront(array(cast (12.99 as decimal(10,3)), cast (34.99 as decimal(10,3))), cast (999.28 as decimal(10,3)))"
qt_sql "select array_pushfront(array(cast ('2023-03-05' as datev2), cast ('2023-03-04' as datev2)), cast ('2023-02-05' as datev2))"
qt_sql "select array_pushfront(array(cast ('2023-03-05 12:23:24.999' as datetimev2(3)),cast ('2023-03-05 15:23:23.997' as datetimev2(3))), cast ('2023-03-08 16:23:54.999' as datetimev2(3)))"
qt_sql "select array_pushfront(array(cast (111.111 as decimalv3(6,3)),cast (222.222 as decimalv3(6,3))), cast (333.333 as decimalv3(6,3)))"

// abnormal test
try {
Expand Down