Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.36.0
Description
Currently, when selecting from a table function, the function call needs to be wrapped in TABLE() like this:
SELECT * FROM TABLE(table_func('args'));
Many dialects (SQL Server, PostgreSQL, BigQuery) do not require this:
SELECT * FROM table_func('args');
The current Calcite grammar can be extended to permit this syntax without conflicting with other productions.
There is a close call with the dynamic columns feature used by Phoenix
SELECT * FROM EventLog(lastGCTime TIME)
It can be disambiguated with 3 tokens of lookahead, seeing past the '(' and identifier to the presence of a type production. The table extension clause for dynamic columns requires at least one field, so the empty case of '()' is not ambiguous either.
Attachments
Issue Links
- is duplicated by
-
CALCITE-1490 Allow table functions without explicit TABLE
- Resolved
- links to