Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
3.3.4
Description
IDENTIFIER clause does not pick up CTE
DECLARE agg = 'max';
DECLARE col = 'c1';
DECLARE tab = 'T';
WITH S(c1, c2) AS (VALUES(1, 2), (2, 3)),
T(c1, c2) AS (VALUES ('a', 'b'), ('c', 'd'))
SELECT IDENTIFIER(agg)(IDENTIFIER(col)) FROM IDENTIFIER(tab);
[TABLE_OR_VIEW_NOT_FOUND] The table or view `T` cannot be found. Verify the spelling and correctness of the schema and catalog.
If you did not qualify the name with a schema, verify the current_schema() output, or qualify the name with the correct schema and catalog.
To tolerate the error on drop use DROP VIEW IF EXISTS or DROP TABLE IF EXISTS. SQLSTATE: 42P01; line 3 pos 45;
'Project [unresolvedalias(expressionwithunresolvedidentifier('agg, org.apache.spark.sql.catalyst.parser.AstBuilder$$Lambda$2785/0x0000009002071490@126688a7))]
+- 'UnresolvedRelation [T], [], false
Attachments
Issue Links
- links to