Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
clintropolis committed Apr 13, 2021
1 parent 151824b commit 7007ac4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions core/src/test/java/org/apache/druid/math/expr/FunctionTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,16 @@ public void testArrayConcat()
assertArrayExpr("array_concat(0, 1)", new Long[]{0L, 1L});
}

@Test
public void testArraySetConcat()
{
assertArrayExpr("array_set_concat([1, 2, 3], [2, 4, 6])", new Long[]{1L, 2L, 3L, 4L, 6L});
assertArrayExpr("array_set_concat([1, 2, 3], 4)", new Long[]{1L, 2L, 3L, 4L});
assertArrayExpr("array_set_concat(0, [1, 2, 3])", new Long[]{0L, 1L, 2L, 3L});
assertArrayExpr("array_set_concat(map(y -> y * 3, b), [1, 2, 3])", new Long[]{1L, 2L, 3L, 6L, 9L, 12L, 15L});
assertArrayExpr("array_set_concat(0, 1)", new Long[]{0L, 1L});
}

@Test
public void testArrayToString()
{
Expand Down

0 comments on commit 7007ac4

Please sign in to comment.