Description
We add missing attributes into Filter in Analyzer. But we shouldn't do it through subqueries like this:
select 1 from (select 1 from onerow t1 LIMIT 1) where t1.c1=1
This query works in current codebase. However, the outside where clause shouldn't be able to refer t1.c1 attribute.
The root cause is we allow subqueries in FROM have no alias names previously, it is confusing and isn't supported by various databases such as MySQL, Postgres, Oracle. We shouldn't support it too.
Attachments
Issue Links
- is related to
-
SPARK-20916 Improve error message for unaliased subqueries in FROM clause
- Resolved
- is superceded by
-
SPARK-21335 support un-aliased subquery
- Resolved
- links to