Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.22.0
-
None
-
None
Description
The currently supported syntax is this:
SELECT * FROM TABLE(TUMBLE(TABLE my_table, ...
But the SQL standard specifies that my_table must be in parentheses, such as here:
SELECT * FROM TABLE(TUMBLE(TABLE(my_table), ...
The second syntax is currently rejected with:
Exception in thread "main" org.apache.calcite.sql.parser.SqlParseException: Encountered "(" at line 1, column 33. Was expecting one of: <BRACKET_QUOTED_IDENTIFIER> ... <QUOTED_IDENTIFIER> ... <BACK_QUOTED_IDENTIFIER> ... <IDENTIFIER> ... <UNICODE_QUOTED_IDENTIFIER> ...
I'm not sure if the currently supported syntax is optional, but I think it's not.
I followed this document: http://standards.iso.org/ittf/PubliclyAvailableStandards/c069776_ISO_IEC_TR_19075-7_2017.zip
The TABLE clause acts in both ways: (1) to convert a table value to a table object (when used in the FROM clause to convert the function result) and (2) to convert a table object to a table value (when used to convert arguments to a function).
Attachments
Issue Links
- is a child of
-
CALCITE-3271 Table-valued function windowing and EMIT syntax support in Calcite
- Open
- is related to
-
CALCITE-3955 Remove the first operand of RexCall from SqlWindowTableFunction
- Reopened