bhat-vinay opened a new pull request, #10947:
URL: https://github.com/apache/hudi/pull/10947

   RecordLevelIndexSupport::filterQueryWithRecordKey() throws a NPE if the 
EqualTo query predicate is not of the form `AttributeReference = Literal`. This 
is because RecordLevelIndexSupport:::getAttributeLiteralTuple() returns null in 
such cases which is then derefercend unconditionally.
   
   This bug was rendering the functional index to not be used even when the 
query predicate had spark functions on which functional index is built. Hence 
these column-stats based functional index was not pruning files.
   
   This PR makes the following minor changes.
   1. Move some methods in RecordLevelIndexSupport into an object to make it 
static (to aid in unit testing)
   2. Fix filterQueryWithRecordKey() by checking for null return values from 
the call to getAttributeLiteralTuple
   3. Add unit tests in TestRecordLevelIndexSupport.scala
   
   ### Change Logs
   
   This PR makes the following minor changes.
   1. Move some methods in RecordLevelIndexSupport into an object to make it 
static (to aid in unit testing)
   2. Fix filterQueryWithRecordKey() by checking for null return values from 
the call to getAttributeLiteralTuple
   3. Add unit tests in TestRecordLevelIndexSupport.scala
   
   ### Impact
   
   Bug fix.
   
   ### Risk level (write none, low medium or high below)
   
   None
   
   ### Documentation Update
   
   None
   
   ### Contributor's checklist
   
   - [ ] Read through [contributor's 
guide](https://hudi.apache.org/contribute/how-to-contribute)
   - [ ] Change Logs and Impact were stated clearly
   - [ ] Adequate tests were added if applicable
   - [ ] CI passed
   


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

Reply via email to