rdettai commented on a change in pull request #8917:
URL: https://github.com/apache/arrow/pull/8917#discussion_r544351700
##########
File path: rust/datafusion/src/datasource/datasource.rs
##########
@@ -34,6 +35,23 @@ pub struct Statistics {
pub total_byte_size: Option<usize>,
}
+/// Indicates whether and how a filter expression can be handled by a
+/// TableProvider for table scans.
+#[derive(Debug, Clone)]
+pub enum TableProviderFilterPushDown {
+ /// The expression cannot be used by the provider.
+ Unsupported,
+ /// The expression can be used to help minimise the data retrieved,
+ /// but the provider cannot guarantee that all returned tuples
Review comment:
I agree the names are explicit!
I am challenging whether having 3 values is necessary. `Unsupported` vs
`Inexact` is something that you don't need to expose publicly here as they are
used internally by the the TableProvider when they will be passed back to the
`scan()` method (or not). Said otherwise, you can leave it to the the
implementation of `scan()` to decide what to do with the expressions, you don't
need to do it with `supports_filter_pushdown()`. Only `Exact` vs
`Unsupported|Inexact` really needs to be exposed because it is used externally
(by the planner)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]