Hi team,
For https://issues.apache.org/jira/browse/CALCITE-6944, I’m happy to make the
GitHub Pull Request #4295<https://github.com/apache/calcite/pull/4295> to fix
it as well if we think its worth fixing. Can someone tell me how to move
forward?
This the issue of an extra parenthesis in the table function.
Why there is an extra parenthesis?
Currently toSqlString this method will add parentheses, which means that the
SQL after toSqlString cannot be parsed.
Test example:
String sqlExpected = "f(a => TABLE t PARTITION BY f1 ORDER BY f2, b => 1)";
String sqlActual = parseExpression(sqlExpected)
.toSqlString(new AnsiSqlDialect(SqlDialect.EMPTY_CONTEXT)).getSql();
parseExpression(sqlActual);
Thanks
Juntao