kasakrisz opened a new pull request #3120: URL: https://github.com/apache/hive/pull/3120
### What changes were proposed in this pull request? Use the data type coming from the Calcite `RelDataType` when creating `RexNode`s from `ColumnInfo` if possible. This process is part of the compilation: converting the query represented by QB objects and AST subtrees to Calcite logical plan. ### Why are the changes needed? When TableScan logical operators are created table constraint information is pulled from the metastore and applied the `RelDataType` associated to the TS operator. Constraints like `not null` has an affect the way Hive rewrites subqueries to joins. Example: if the optimizer is aware that the lhs of an in subquery can not be null a simpler rewrite is chosen. See jira for example plans. ### Does this PR introduce _any_ user-facing change? No, but `explain` command output may be different in older Hive versions. ### How was this patch tested? ``` mvn test -Dtest.output.overwrite -DskipSparkTests -Dtest=TestTezTPCDS30TBPerfCliDriver -Dqfile=query45.q -pl itests/qtest -Pitests mvn test -Dtest.output.overwrite -DskipSparkTests -Dtest=TestMiniLlapLocalCliDriver -Dqfile=subquery_in.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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
