kasakrisz opened a new pull request #1696: URL: https://github.com/apache/hive/pull/1696
### What changes were proposed in this pull request? Disable materialized view rewrite at view creation. ### Why are the changes needed? Hive doesn't support view creation when one of the source tables is a materialized view. When the `create view` command is executed the select statement is compiled and the optimizer applies materialized view rewrites if any suitable materialized view exists. A successful rewrite leads to Exception: ``` org.apache.hadoop.hive.ql.parse.SemanticException: View definition references materialized view default.mv1 ``` See the jira for full stacktrace. ### Does this PR introduce _any_ user-facing change? Users can create views even if its query is matching with an existing materialized view query. No SemanticException should be thrown because of that. ### How was this patch tested? ``` mvn test -Dtest.output.overwrite -DskipSparkTests -Dtest=TestMiniLlapLocalCliDriver -Dqfile=create_view_when_mv_exists.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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org