JingsongLi commented on code in PR #224:
URL: https://github.com/apache/paimon-rust/pull/224#discussion_r3050470775


##########
crates/integrations/datafusion/src/filter_pushdown.rs:
##########
@@ -58,6 +58,22 @@ pub(crate) fn build_pushed_predicate(filters: &[Expr], 
fields: &[DataField]) ->
     }
 }
 
+/// Whether it is safe to pass a row-count hint down to paimon-core planning.
+///
+/// This stays intentionally narrow: the hint is only safe when there are no
+/// filters, or when every filter is exact at the table-provider boundary.
+pub(crate) fn can_push_down_limit_hint(
+    filters: &[Expr],
+    fields: &[DataField],
+    partition_keys: &[String],
+) -> bool {
+    filters.is_empty()
+        || filters.iter().all(|filter| {
+            classify_filter_pushdown(filter, fields, partition_keys)

Review Comment:
   We can just provide a method in read_builder.rs, `exacted_filter_pushdown` 
return bool.
   You can just use this method to datafusion `supports_filters_pushdown`. For 
limit, you can just push it always.
   
   And then what else do we need to do?



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