If virtual column has new line after Select clause in sub query, opening window throw exception
Attached is patch containing fix as well as unit test cases.
Hi , I think the patch is dangerous as eventually it could replace newlines within a text, i.e. a virtual column like:
will be changed in the AccessSqlParser. Indeed the actual code can change newlines within text for the words FROM and WHERE, I this is better to avoid adding more potential cases.
Also, if you write your subquery like "( SELECT ..." it will fail again because line 176 of AccessSqlParser is looking for a strict notation.
The workaround is very simple, just add a space in front of the SELECT
What I understand from the AccessSqlParser class is that you need to follow some strict guidelines to work with that - i.e. some uppercase reserved words - I think it would be valuable to write a wiki page with the rules required (in this case subqueries must conform to "(SELECT " notation.
Undestood. Should you think we should replace "(SELECT\n" or "(SELECT\t" with "(SELECT "?
No Deepak, I think is better to change the virtual column in such case.