beyond1920 commented on code in PR #2606:
URL: https://github.com/apache/calcite/pull/2606#discussion_r906838992
##########
testkit/src/main/java/org/apache/calcite/sql/parser/SqlParserTest.java:
##########
@@ -3988,6 +3988,77 @@ void checkPeriodPredicate(Checker checker) {
sql(sql).ok(expected);
}
+ @Test void testTableFunction() {
+ final String sql = "select * from table(score(table orders))";
+ final String expected = "SELECT *\n"
+ + "FROM TABLE(`SCORE`((TABLE `ORDERS`)))";
Review Comment:
Good catch.
The first set of parentheses are added when to unparse operands of 'SCORE'
function.
The extra set of parentheses are added when to handle the first operand,
which is a SqlCall 'EXPLICT_TABLE' because it's a SqlKind.EXPRESSION.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]