luoyuxia commented on code in PR #205:
URL: https://github.com/apache/paimon-rust/pull/205#discussion_r3036397371


##########
crates/paimon/src/table/table_scan.rs:
##########
@@ -691,8 +691,14 @@ impl<'a> TableScan<'a> {
             }
         }
 
-        // Apply limit pushdown to reduce the number of splits if possible
-        let splits = self.apply_limit_pushdown(splits);
+        // Apply limit pushdown only when there are no data predicates.
+        // With data predicates, merged_row_count() reflects pre-filter row 
counts,
+        // so stopping early could return fewer rows than the limit after 
filtering.
+        let splits = if data_predicates.is_empty() {

Review Comment:
   good catch on it.  I'm wondering whether java&python has same issue?



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