Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Invalid
-
None
-
None
Description
If the alias of CTE is conflicted with the table name, we use the alias fetching the table other than replacing it with the ASTNode tree, this may cause some confusing problems. For example:
create table game_info (game_name string); with game_info as ( select distinct ext_id, dev_app_id, game_name from game_info_extend ) select count(game_name) from game_info;
The query will return the number of rows of the table game_info, instead of the game_info_extend. Maybe we should better throw an exception to avoid such cases.