-
Notifications
You must be signed in to change notification settings - Fork 670
Description
See https://clickhouse.com/docs/sql-reference/table-functions.
For example:
SELECT * FROM test;
SELECT * FROM test();They produce:
pre_visit_table_factor: Table { name: ObjectName([Identifier(Ident { value: "test", quote_style: None, span: Span(Location(1,16)..Location(1,20)) })]), alias: None, args: None, with_hints: [], version: None, with_ordinality: false, partitions: [], json_path: None, sample: None, index_hints: [] }
and
pre_visit_table_factor: Table { name: ObjectName([Identifier(Ident { value: "test", quote_style: None, span: Span(Location(1,16)..Location(1,20)) })]), alias: None, args: Some(TableFunctionArgs { args: [], settings: None }), with_hints: [], version: None, with_ordinality: false, partitions: [], json_path: None, sample: None, index_hints: [] }
The second version produces args: Some(TableFunctionArgs { args: [], settings: None }).
As I see it's because Function is only recognized after a LATERAL keyword, and TableFunction is only for the TABLE() syntax (but not for ident()).