okumin opened a new pull request, #5207:
URL: https://github.com/apache/hive/pull/5207

   ### What changes were proposed in this pull request?
   
   Add a null check when using `RelMetadataQuery#areColumnsUnique`.
   https://issues.apache.org/jira/browse/HIVE-28207
   
   ### Why are the changes needed?
   
   `RelMetadataQuery#areColumnsUnique` returns `true,` `false,` or `null.` Some 
of our implementations skip testing whether it is null and throw NPE.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No. It is a bug fix to resolve NPE.
   
   ### Is the change a dependency upgrade?
   
   No.
   
   ### How was this patch tested?
   
   I added integration tests.
   Without this patch, `cbo_join_constraints.q` fails with NPE thrown by 
`HiveJoinConstraintsRule`.
   `cbo_row_count_non_simple_filter.q` hits the problem of 
`HiveJoinConstraintsRule` and `HiveRelMdRowCount`.
   I have not found a real case where the issue happens with 
`HiveAggregateSplitRule`.


-- 
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: gitbox-unsubscr...@hive.apache.org

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

Reply via email to