You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/11/18 15:41:25 UTC

[GitHub] [arrow-datafusion] alamb commented on a diff in pull request #4281: Fix issue in filter pushdown with overloaded projection index

alamb commented on code in PR #4281:
URL: https://github.com/apache/arrow-datafusion/pull/4281#discussion_r1026587621


##########
datafusion/core/src/physical_plan/file_format/parquet/row_filter.rs:
##########
@@ -219,7 +219,9 @@ impl<'a> ExprRewriter for FilterCandidateBuilder<'a> {
     fn pre_visit(&mut self, expr: &Expr) -> Result<RewriteRecursion> {
         if let Expr::Column(column) = expr {
             if let Ok(idx) = self.file_schema.index_of(&column.name) {
-                self.required_column_indices.push(idx);
+                if !self.required_column_indices.contains(&idx) {

Review Comment:
   🤔  maybe using a Set for the indices would make the intent clearer (and ensure a duplicated column doesn't sneak back in). I don't think it is a huge deal however. 



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org