mustafasrepo commented on code in PR #9346:
URL: https://github.com/apache/arrow-datafusion/pull/9346#discussion_r1505429760


##########
datafusion/physical-plan/src/lib.rs:
##########
@@ -121,21 +121,23 @@ pub trait ExecutionPlan: Debug + DisplayAs + Send + Sync {
     fn as_any(&self) -> &dyn Any;
 
     /// Get the schema for this execution plan
-    fn schema(&self) -> SchemaRef;
+    fn schema(&self) -> SchemaRef {
+        self.cache().schema().clone()
+    }
+
+    fn cache(&self) -> &PlanPropertiesCache;
 
     /// Specifies how the output of this `ExecutionPlan` is split into
     /// partitions.
-    fn output_partitioning(&self) -> Partitioning;
+    fn output_partitioning(&self) -> &Partitioning {

Review Comment:
   I have applied your suggesion @alamb. Thanks for the suggestion. It is very 
neat. I thought about this possibility, However couldn't come up with a way to 
prevent it.



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

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

Reply via email to