public static Statement sanitize(
      final Statement node,
      final MetaStore metaStore) {
    return sanitize(node, metaStore, true);
  }
@Test
  public void shouldAllowNestedLambdaFunctionsWithoutDuplicate() {
    // Given:
    final Statement stmt = givenQuery(
        "SELECT TRANSFORM_ARRAY(Col4, (X,Y,Z) => TRANSFORM_MAP(Col4, Q => 4, H => 5), (X,Y,Z) => 0) FROM TEST1;");

    // When:
    final Query result = (Query) AstSanitizer.sanitize(stmt, META_STORE);

    // Then:
    assertThat(result.getSelect(), is(new Select(ImmutableList.of(
        new SingleColumn(
            new FunctionCall(
                FunctionName.of("TRANSFORM_ARRAY"),
                ImmutableList.of(
                    column(TEST1_NAME, "COL4"),
                    new LambdaFunctionCall(
                        ImmutableList.of("X", "Y", "Z"),
                        new FunctionCall(
                            FunctionName.of("TRANSFORM_MAP"),
                            ImmutableList.of(
                                column(TEST1_NAME, "COL4"),
                                new LambdaFunctionCall(
                                    ImmutableList.of("Q"),
                                    new IntegerLiteral(4)
                                ),
                                new LambdaFunctionCall(
                                    ImmutableList.of("H"),
                                    new IntegerLiteral(5)
                                )
                            )
                        )
                    ),
                    new LambdaFunctionCall(
                        ImmutableList.of("X", "Y", "Z"),
                        new IntegerLiteral(0)
                    )
                )
            ),
            Optional.of(ColumnName.of("KSQL_COL_0")))
    ))));
  }