Closed lukas-mi closed 5 years ago
I'm not really familiar with the code base but this seemed like an obvious solution. Also regarding tests I guess testing this would be redundant since there are already tests covering various SELECT
cases.
Yeah, this fix looks good. If you could add the one failing parse case of
CREATE VIEW test_schema.test_view_union AS
SELECT
a0 as a,
b0 as b
FROM test_schema.test_table_0
UNION
SELECT
a1 as a,
b1 as b
FROM test_schema.test_table_1;
to https://github.com/uber/queryparser/blob/master/test/Database/Sql/Vertica/Parser/Test.hs, that would address all my concerns
updated
Vertica CREATE VIEW statements can contain more complex
SELECT
queries (includingUNION
,ORDER BY
and other clauses). Since all of the currently existing value constructors of Query are supported by Vertica inSELECT
and therefore inCREATE VIEW
, queryP can be used in parsingCREATE VIEW
statements.Related issue - #48