LiaCastaneda commented on code in PR #20337:
URL: https://github.com/apache/datafusion/pull/20337#discussion_r2849952543


##########
datafusion-examples/examples/custom_data_source/custom_datasource.rs:
##########
@@ -283,4 +284,19 @@ impl ExecutionPlan for CustomExec {
             None,
         )?))
     }
+
+    fn apply_expressions(
+        &self,
+        f: &mut dyn FnMut(
+            &dyn datafusion::physical_plan::PhysicalExpr,
+        ) -> Result<TreeNodeRecursion>,
+    ) -> Result<TreeNodeRecursion> {
+        // Visit expressions in the output ordering from equivalence properties
+        if let Some(ordering) = self.cache.output_ordering() {
+            for sort_expr in ordering {
+                f(sort_expr.expr.as_ref())?;

Review Comment:
   👍 yes I missed this, there are actually existing helpers in the 
`TreeNodeRecursion` API that help with this.



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

Reply via email to