Skip to content

Commit 967e7dc

Browse files
committed
added tests with lambda
1 parent 5f172d2 commit 967e7dc

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

jdbc-v2/src/test/java/com/clickhouse/jdbc/internal/BaseSqlParserFacadeTest.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,16 @@ public Object[][] testMiscStmtDp() {
344344
{" \n INSERT INTO TESTING \n SELECT ? AS num", 1},
345345
{" SELECT '##?0.1' as f, ? as a\n #this is debug \n FROM table", 1},
346346
{"WITH '#!?0.1' as f, ? as a\n #this is debug \n SELECT * FROM a", 1},
347-
{SELECT_WITH_WHERE_CLAUSE_FUNC_WITH_PARAMS, 2}
347+
{SELECT_WITH_WHERE_CLAUSE_FUNC_WITH_PARAMS, 2},
348+
{"SELECT arrayFilter(x -> x > 0, [0, 1, 2, -3])", 0},
349+
{"SELECT [0, 1, 2, -3] arr, arrayFilter(x -> x > 0, arr)", 0},
350+
{"SELECT arrayFill(x, y, z -> x > y AND x < z, [5, 3, 6, 2], [4, 7, 1, 3], [10, 2, 8, 5]) AS res", 0},
351+
{"SELECT arrayFilter(x -> x LIKE '%World%', ['Hello', 'abc World']) AS res", 0},
352+
{"SELECT arrayFilter(x -> not (x is null), ['Hello', 'abc World']) AS res", 0},
353+
{"SELECT arrayDistinct(arrayFilter(x -> not (x is null), " +
354+
" arrayConcat(t.s.arr1, t.s.arr2)" +
355+
" )" +
356+
")", 0},
348357
};
349358
}
350359

0 commit comments

Comments
 (0)