shidayang opened a new issue, #1731:
URL: https://github.com/apache/incubator-paimon/issues/1731

   ### Search before asking
   
   - [X] I searched in the 
[issues](https://github.com/apache/incubator-paimon/issues) and found nothing 
similar.
   
   
   ### Motivation
   
   Adding a value filter can improve pruning efficiency and thus improve query 
performance
   
   ### Solution
   
   consider this case:
   ```
    L(Level 0f LSM)3: insert key = 1, value = a
    L2: update key = 1, value = b
   filter: value = a
   ```
   If we perform filter push down on value, L3 file will be chosen , but L2 
file will be ignored, and the final result will be  key = 1, value = a while 
the correct is empty. We can't simple push down filters to all file.We can 
refine the cases and push down some files accordingly.
   
   **Case 1:**
   If the user has not configured sequence.field, then the highest LSM level 
'Sorted Run' under the bucket can be pushed down.
   Consider above case, if L3 is the highest level in current bucket, if we 
only filter L3, the final result will be empty, it's correct!
   
   **Case 2:**
   Consider this case:
   ```
    L4: insert key = 2, value = c
    L3: update key = 1, value = a
    L2: update key = 1, value = b
   filter: key = 1, value = a
   ```
    User has not configured sequence.field. If key filter pushdown filters out 
all files in the highest level L4, then value filter pushdown can be applied to 
L3. The result obtained by following this step in the above example will be 
empty, it's correct.
   
   
   
   
   
   ### Anything else?
   
   _No response_
   
   ### 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