LiaCastaneda commented on code in PR #24068:
URL: https://github.com/apache/datafusion/pull/24068#discussion_r3719266958
##########
datafusion/physical-plan/src/execution_plan.rs:
##########
@@ -165,6 +166,20 @@ pub trait ExecutionPlan: Any + Debug + DisplayAs + Send +
Sync {
check_default_invariants(self, check)
}
+ /// Returns the dynamic expressions produced by this plan node.
+ ///
+ /// A dynamic expression is produced when this node updates or completes
its
+ /// runtime state during execution. Expressions that this node only
consumes
+ /// must not be returned. This method is shallow and does not include
dynamic
+ /// expressions produced by child plans.
+ ///
+ /// Each returned expression must have a [`PhysicalExpr::expression_id`]
+ /// since all dynamic expressions such as [`DynamicFilterPhysicalExpr`]
+ /// have an expression id.
+ fn dynamic_expressions(&self) -> Vec<Arc<dyn PhysicalExpr>> {
+ Vec::new()
+ }
Review Comment:
Do you think a better name would be `dynamic_expressions_produced`, or
something that indicates it only returns dynamic filters that are produced? I
think this name can be a bit misleading and might be interpreted as returning
any dynamic filters the node is holding, whether it is a consumer holding the
dynamic filters it will consume or a producer holding the dynamic filters it
will produce. I had to read
[this](https://github.com/apache/datafusion/issues/23814#issuecomment-5051433022)
comment to understand the motivation behind it
##########
datafusion/physical-plan/src/joins/hash_join/exec.rs:
##########
@@ -1330,6 +1330,16 @@ impl ExecutionPlan for HashJoinExec {
vec![&self.left, &self.right]
}
+ fn dynamic_expressions(&self) -> Vec<Arc<dyn PhysicalExpr>> {
Review Comment:
If this function is supposed to be the promotion of the non trait function
`dynamic_filter_expr`, should we remove `dynamic_filter_expr`?
--
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]