itsjunetime commented on code in PR #12135:
URL: https://github.com/apache/datafusion/pull/12135#discussion_r1742686796
##########
datafusion/core/src/datasource/listing/table.rs:
##########
@@ -826,28 +833,46 @@ impl TableProvider for ListingTable {
&self,
filters: &[&Expr],
) -> Result<Vec<TableProviderFilterPushDown>> {
- let support: Vec<_> = filters
+ Ok(filters
.iter()
.map(|filter| {
if expr_applicable_for_cols(
&self
.options
.table_partition_cols
.iter()
- .map(|x| x.0.clone())
+ .map(|col| col.0.as_str())
.collect::<Vec<_>>(),
filter,
) {
// if filter can be handled by partition pruning, it is
exact
- TableProviderFilterPushDown::Exact
- } else {
- // otherwise, we still might be able to handle the filter
with file
- // level mechanisms such as Parquet row group pruning.
- TableProviderFilterPushDown::Inexact
+ return TableProviderFilterPushDown::Exact;
}
+
+ #[cfg(feature = "parquet")]
Review Comment:
Yeah, this is a good point. I added another method on the FileFormat trait
which does this, but not exactly in this same way. We need access to the
`file_schema` and `table_schema` of the relevant query in this method for the
`ParquetFormat` to return an accurate answer to this question, so I made the
method accept the `file_schema` and `table_schema` as arguments.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]