kasakrisz opened a new pull request #3121:
URL: https://github.com/apache/hive/pull/3121


   ### What changes were proposed in this pull request?
   Add nullability to `ColumnInfo` and use it when creating `RexNodes`
   
   ### 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]

Reply via email to