Skip to content

Commit

Permalink
Fix indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
findepi committed Sep 9, 2020
1 parent ba1dc08 commit cc289c9
Showing 1 changed file with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,26 +40,26 @@ public void teardown()
public void testDuplicateLambdaExpressions()
{
assertThat(assertions.query("" +
"SELECT cardinality(filter(a, x -> x > 0)) " +
"FROM (VALUES " +
" ARRAY[1,2,3], " +
" ARRAY[0,1,2]," +
" ARRAY[0,0,0]" +
") AS t(a) " +
"GROUP BY cardinality(filter(a, x -> x > 0))" +
"ORDER BY cardinality(filter(a, x -> x > 0))"))
"SELECT cardinality(filter(a, x -> x > 0)) " +
"FROM (VALUES " +
" ARRAY[1,2,3], " +
" ARRAY[0,1,2]," +
" ARRAY[0,0,0]" +
") AS t(a) " +
"GROUP BY cardinality(filter(a, x -> x > 0))" +
"ORDER BY cardinality(filter(a, x -> x > 0))"))
.matches("VALUES BIGINT '0', BIGINT '2', BIGINT '3'");

// same type
assertThat(assertions.query("" +
"SELECT transform(a, x -> x + 1), transform(b, x -> x + 1) " +
"FROM (VALUES ROW(ARRAY[1, 2, 3], ARRAY[10, 20, 30])) t(a, b)"))
"SELECT transform(a, x -> x + 1), transform(b, x -> x + 1) " +
"FROM (VALUES ROW(ARRAY[1, 2, 3], ARRAY[10, 20, 30])) t(a, b)"))
.matches("VALUES ROW(ARRAY[2, 3, 4], ARRAY[11, 21, 31])");

// different type
assertThat(assertions.query("" +
"SELECT transform(a, x -> x + 1), transform(b, x -> x + 1) " +
"FROM (VALUES ROW(ARRAY[1, 2, 3], ARRAY[10e0, 20e0, 30e0])) t(a, b)"))
"SELECT transform(a, x -> x + 1), transform(b, x -> x + 1) " +
"FROM (VALUES ROW(ARRAY[1, 2, 3], ARRAY[10e0, 20e0, 30e0])) t(a, b)"))
.matches("VALUES ROW(ARRAY[2, 3, 4], ARRAY[11e0, 21e0, 31e0])");
}

Expand All @@ -68,14 +68,14 @@ public void testNestedLambda()
{
// same argument name
assertThat(assertions.query("" +
"SELECT transform(a, x -> transform(ARRAY[x], x -> x + 1)) " +
"FROM (VALUES ARRAY[1, 2, 3]) t(a)"))
"SELECT transform(a, x -> transform(ARRAY[x], x -> x + 1)) " +
"FROM (VALUES ARRAY[1, 2, 3]) t(a)"))
.matches("VALUES ARRAY[ARRAY[2], ARRAY[3], ARRAY[4]]");

// different argument name
assertThat(assertions.query("" +
"SELECT transform(a, x -> transform(ARRAY[x], y -> y + 1)) " +
"FROM (VALUES ARRAY[1, 2, 3]) t(a)"))
"SELECT transform(a, x -> transform(ARRAY[x], y -> y + 1)) " +
"FROM (VALUES ARRAY[1, 2, 3]) t(a)"))
.matches("VALUES ARRAY[ARRAY[2], ARRAY[3], ARRAY[4]]");
}
}

0 comments on commit cc289c9

Please sign in to comment.