Description
SimpleSqlParser.purgeSelectExprsKeepAliases tries to replace expressions in select clause with aliases, and it often produces invalid SQL:
select * from dummy is replaced with select 0 AS "*" from dummy which is invalid
select a.x+ b.y from dummy is replaced with select 0 AS "b.y" from dummy and so on.
Testcase:
select ax^ from (select * from dummy a)
Actual output:
SELECT ax _suggest_ FROM ( SELECT 0 AS * FROM dummy a )
I'm inclined to comment purgeSelectExprsKeepAliases out for now.
Attachments
Issue Links
- links to