Search before asking
Paimon version
master (1.5-SNAPSHOT)
Compute Engine
Flink (secondary-index lookup join with lookup.cache = MEMORY).
Minimal reproduce step
- Run a lookup join whose join key is not the table's primary key (a secondary-index lookup), with
lookup.cache = MEMORY and a lookup filter (predicate).
- Feed a changelog where a row that does not pass the predicate is later deleted (a
-D / -U for that key).
What doesn't meet your expectations?
The lookup refresh crashes with a NullPointerException. SecondaryIndexLookupTable.refreshRow only adds a row to the index state when the predicate passes (on +I / +U), but retracts unconditionally on -D / -U. So a row that was filtered out was never added, and its later retract reaches InMemorySetState.retract, which does values.get(secKey).remove(...) with no null check and throws. 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.
Anything else?
This is a behavior inconsistency between the two SetState implementations; MEMORY mode should tolerate the absent-key retract like the disk-backed one.
Are you willing to submit a PR?
Search before asking
Paimon version
master (1.5-SNAPSHOT)
Compute Engine
Flink (secondary-index lookup join with
lookup.cache = MEMORY).Minimal reproduce step
lookup.cache = MEMORYand a lookup filter (predicate).-D/-Ufor that key).What doesn't meet your expectations?
The lookup refresh crashes with a
NullPointerException.SecondaryIndexLookupTable.refreshRowonly adds a row to the index state when the predicate passes (on+I/+U), but retracts unconditionally on-D/-U. So a row that was filtered out was never added, and its later retract reachesInMemorySetState.retract, which doesvalues.get(secKey).remove(...)with no null check and throws. The disk-backed siblingLocalKvSetState.retractalready treats an absent key as a no-op, so the same join crashes only inMEMORYcache mode.Anything else?
This is a behavior inconsistency between the two
SetStateimplementations;MEMORYmode should tolerate the absent-key retract like the disk-backed one.Are you willing to submit a PR?