Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.34.0
Description
Implicit column alias for single-column table function works only for UNNEST at the moment. But should work for every table function.
For example, PostgreSQL:
CREATE OR REPLACE FUNCTION fun() RETURNS TABLE(col int) AS $$ SELECT 1 $$ LANGUAGE 'sql' VOLATILE; SELECT f.col, f FROM fun() as f; col | f -----+--- 1 | 1 (1 row) SELECT * FROM fun() as f; col ----- 1 (1 row) SELECT f FROM fun() as f; f --- 1 (1 row)
Calcite throws "Column 'i' not found in any table" exception for
SELECT i FROM table(generate_series(1,2)) as i
Where generate_series is user defined table function.
Attachments
Issue Links
- links to