zhangyue19921010 opened a new issue, #11354:
URL: https://github.com/apache/paimon/issues/11354

   ### Search before asking
   
   - [x] I searched in the issues and found nothing similar.
   
   ### Paimon version
   
   2.2-SNAPSHOT, master at `8d704811cb40a7193f0daf73a5d278f10e65e4b6`.
   
   ### Compute Engine
   
   Flink 1.20.1 lookup connector.
   
   ### Minimal reproduce step
   
   1. Create a partitioned primary-key table with fields `(pt INT, k INT, v 
BIGINT)`, primary key `(pt, k)`, and partition key `pt`. Configure 
`scan.partitions=max_pt()` and `lookup.cache=full`.
   2. Insert `(1, 2, 3)` and look up key `2` to load the dimension cache.
   3. Remove the only partition, `pt=1`, and let the dynamic partition refresh 
run.
   4. Look up key `2` again.
   
   A direct connector regression using a real table and 
`TableCommitImpl.truncatePartitions` confirms that the partition scan is empty 
but lookup still returns the cached row. The same result occurs with full, 
memory, and automatic cache modes, including asynchronous partition refresh for 
full and memory caches.
   
   ### What doesn't meet your expectations?
   
   Lookup should return no matches after partition refresh finds no partitions. 
It keeps returning the removed partition's cached rows instead.
   
   ### Anything else?
   
   The empty-selection fast path skips cache refresh, while lookup still uses 
the previously loaded partition list. Checking the current empty selection 
before reading the cache avoids stale matches without changing nonempty 
asynchronous refresh behavior.
   
   ### Are you willing to submit a PR?
   
   - [x] I'm willing to submit a 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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to