You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: presto-native-sidecar-plugin/src/test/java/com/facebook/presto/sidecar/TestNativeSidecarPlugin.java
+3-2
Original file line number
Diff line number
Diff line change
@@ -127,6 +127,8 @@ public void testShowFunctions()
127
127
@Test
128
128
publicvoidtestGeneralQueries()
129
129
{
130
+
assertQuery("SELECT ARRAY['abc']");
131
+
assertQuery("SELECT ARRAY[1, 2, 3]");
130
132
assertQuery("SELECT substr(comment, 1, 10), length(comment), trim(comment) FROM orders");
131
133
assertQuery("SELECT substr(comment, 1, 10), length(comment), ltrim(comment) FROM orders");
132
134
assertQuery("SELECT substr(comment, 1, 10), length(comment), rtrim(comment) FROM orders");
@@ -170,6 +172,7 @@ public void testAggregateFunctions()
170
172
assertQuery("SELECT checksum(from_unixtime(orderkey, '+01:00')) FROM lineitem WHERE orderkey < 20");
171
173
assertQuerySucceeds("SELECT shuffle(array_sort(quantities)) FROM orders_ex");
172
174
assertQuery("SELECT array_sort(shuffle(quantities)) FROM orders_ex");
175
+
assertQuery("SELECT orderkey, array_sort(reduce_agg(linenumber, CAST(array[] as ARRAY(INTEGER)), (s, x) -> s || x, (s, s2) -> s || s2)) FROM lineitem group by orderkey");
173
176
}
174
177
175
178
@Test
@@ -188,8 +191,6 @@ public void testArraySort()
188
191
{
189
192
assertQueryFails("SELECT array_sort(quantities, (x, y) -> if (x < y, 1, if (x > y, -1, 0))) FROM orders_ex",
190
193
"line 1:31: Expected a lambda that takes 1 argument\\(s\\) but got 2");
191
-
assertQueryFails("SELECT orderkey, array_sort(reduce_agg(linenumber, CAST(array[] as ARRAY(INTEGER)), (s, x) -> s || x, (s, s2) -> s || s2)) FROM lineitem group by orderkey",
192
-
".*Unexpected parameters \\(array\\(integer\\), array\\(integer\\)\\) for function native.default.concat.*");
0 commit comments