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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to