LuciferYang opened a new pull request, #10280:
URL: https://github.com/apache/paimon/pull/10280

   ### Purpose
   
   `InMemorySetState.retract` did 
`values.get(wrapBytes(serializeKey(key))).remove(...)` with no null check, so 
retracting a key that was never added throws a `NullPointerException`. This is 
reachable in a `lookup.cache = MEMORY` secondary-index lookup join with a 
filter: `SecondaryIndexLookupTable.refreshRow` only adds to the index state 
when the predicate passes (`+I` / `+U`) but retracts unconditionally on `-D` / 
`-U`, so a row that was filtered out is never added, and its later retract 
crashes the lookup refresh. The disk-backed sibling `LocalKvSetState.retract` 
already treats an absent key as a no-op, so the same join crashes only in 
`MEMORY` cache mode.
   
   This adds the null guard so `InMemorySetState.retract` no-ops on an absent 
key, matching the disk-backed contract. The present-key path is unchanged.
   
   This closes #10279.
   
   ### Tests
   
   - `InMemorySetStateTest#testRetractOnAbsentKeyIsNoOp` pins that retracting 
an absent key is a no-op. Without the fix it throws `NullPointerException`.
   
   ### API and Format
   
   No.
   
   ### Documentation
   
   No.
   


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