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


##########
datafusion/optimizer/src/push_down_projection.rs:
##########
@@ -374,6 +374,24 @@ fn optimize_plan(
             )?;
             from_plan(plan, &plan.expressions(), &[child])
         }
+        // at a distinct, all columns are required

Review Comment:
   👍 



##########
datafusion/optimizer/src/push_down_projection.rs:
##########
@@ -1009,6 +1026,25 @@ mod tests {
         Ok(())
     }
 
+    #[test]
+    fn pushdown_through_distinct() -> Result<()> {
+        let table_scan = test_table_scan()?;
+
+        let plan = LogicalPlanBuilder::from(table_scan)
+            .project(vec![col("a"), col("b")])?

Review Comment:
   👍 



-- 
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