kasakrisz opened a new pull request #1865: URL: https://github.com/apache/hive/pull/1865
### What changes were proposed in this pull request? 1. Improve the parser to accept CTE clause with `with column list` specified: ``` WITH cte(a, b) AS ... ``` 2. When transforming subquery AST tree to Calcite RelNode tree a new RowResolver is created for the subquery's top node to point its alias. Extend this logic with assign the `with column list` elements to each entry if explicitly specified in the `WITH` clause. ### Why are the changes needed? SQL standard enables this feature. ### Does this PR introduce _any_ user-facing change? Yes. When users specify `with column list` the list elements must be used to reference expressions in the CTE' select clause from the main query. ### How was this patch tested? ``` mvn test -DskipSparkTests -Dtest=TestMiniLlapLocalCliDriver -Dqfile=cte_8.q -pl itests/qtest -Pitests mvn test -DskipSparkTests -Dtest=TestMiniLlapLocalCliDriver -Dqfile=cte_mat_1.q -pl itests/qtest -Pitests ``` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
