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

   ### Purpose
   
   DataTableBatchScan.applyPushDownTopN prunes splits by the sort column's 
min/max stats, but a non-partition WHERE filter drops rows at read time, after 
pruning. A split kept for its stats may have its top rows filtered out, while a 
split holding the true post-filter top-N may be pruned and never read — so 
ORDER BY ... LIMIT can return wrong/missing rows.
   
   Skip TopN pushdown when snapshotReader.hasNonPartitionFilter(), mirroring 
applyPushDownLimit (which already guards both this and the auth filter). 
Partition-only filters are unaffected, since all surviving rows pass and 
stats-based pruning stays valid.


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