LiaCastaneda commented on code in PR #20337:
URL: https://github.com/apache/datafusion/pull/20337#discussion_r2805390030
##########
datafusion/physical-plan/src/execution_plan.rs:
##########
@@ -204,6 +204,17 @@ pub trait ExecutionPlan: Debug + DisplayAs + Send + Sync {
/// joins).
fn children(&self) -> Vec<&Arc<dyn ExecutionPlan>>;
+ /// Returns all expressions (non-recursively) evaluated by the current
Review Comment:
> I think we should probably also not provide a default implementation to
force all implementations to properly visit the expressions
If we provide this default implementation, then downstream implementors will
likely not implement the API and if something in the datafusion core depends on
the API in the future it will be hard to debug what is going on
makes sense, I included a default implementation because didn't want to
incroduce a breaking change but is better to be safe and force the
implementation 👍
> what would you think about adding apply_expressions and map_expressions
methods to parallel the ones on LogicalPlan instead?
nice catch, I missed the allocation fact, I will give it a try
##########
datafusion/physical-plan/src/execution_plan.rs:
##########
@@ -204,6 +204,17 @@ pub trait ExecutionPlan: Debug + DisplayAs + Send + Sync {
/// joins).
fn children(&self) -> Vec<&Arc<dyn ExecutionPlan>>;
+ /// Returns all expressions (non-recursively) evaluated by the current
Review Comment:
> I think we should probably also not provide a default implementation to
force all implementations to properly visit the expressions
If we provide this default implementation, then downstream implementors will
likely not implement the API and if something in the datafusion core depends on
the API in the future it will be hard to debug what is going on
makes sense, I included a default implementation because didn't want to
incroduce a breaking change but is better to be safe and force the
implementation 👍
> what would you think about adding apply_expressions and map_expressions
methods to parallel the ones on LogicalPlan instead?
nice catch, I missed the allocation fact, I will give it a try
--
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]