eejbyfeldt commented on code in PR #12943:
URL: https://github.com/apache/datafusion/pull/12943#discussion_r1801682586


##########
datafusion/optimizer/src/push_down_filter.rs:
##########
@@ -685,7 +685,8 @@ impl OptimizerRule for PushDownFilter {
                         .map(LogicalPlan::Filter)?;
                 insert_below(LogicalPlan::Repartition(repartition), new_filter)
             }
-            LogicalPlan::Distinct(distinct) => {
+            LogicalPlan::Distinct(distinct @ Distinct::All(_)) => {
+                // note that we check for distinct all as distinct on is not 
commutable

Review Comment:
   > Do you know any tool or function that can help with that?
   
   This function 
https://github.com/apache/datafusion/blob/8acd5cb0f13620c85d86d9ebdb8475a3905f7714/datafusion/core/src/datasource/listing/helpers.rs#L54
 is used for determining if an Expr can be evaluated using a subset of columns 
(currently use for pushdown in to the table scan). Perhaps it could be used?



-- 
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-unsubscr...@datafusion.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to