HeartSaVioR opened a new pull request #30170:
URL: https://github.com/apache/spark/pull/30170


   
   ### What changes were proposed in this pull request?
   
   This PR proposes to fix the NPE issue on `In` filter when one of values 
contain null. In real case, you can trigger this issue when you try to push 
down the filter with `in (..., null)` against V2 source table. 
`DataSourceStrategy` caches the mapping (filter instance -> expression) in 
HashMap, which leverages hash code on the key, hence it could trigger the NPE 
issue.
   
   ### Why are the changes needed?
   
   This is an obvious bug as `In` filter doesn't care about null value when 
calculating hash code.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes, previously the query with having `null` in "in" condition against data 
source V2 source table supporting push down filter failed with NPE, whereas 
after the PR the query will not fail.
   
   ### How was this patch tested?
   
   UT added. The new UT fails without the PR and passes with the PR.
   


----------------------------------------------------------------
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]

Reply via email to