jayshrivastava commented on code in PR #21807:
URL: https://github.com/apache/datafusion/pull/21807#discussion_r3140803037


##########
datafusion/physical-expr/src/expressions/dynamic_filters.rs:
##########
@@ -65,6 +65,10 @@ pub struct DynamicFilterPhysicalExpr {
     /// If any of the children were remapped / modified (e.g. to adjust for 
projections) we need to keep track of the new children
     /// so that when we update `current()` in subsequent iterations we can 
re-apply the replacements.
     remapped_children: Option<Vec<Arc<dyn PhysicalExpr>>>,
+    /// Unique identifier for this dynamic filter.
+    ///
+    /// Derived filters (ex. via `with_new_children`) should inherit the 
expression id of the source filter.
+    expression_id: u64,
     /// The source of dynamic filters.
     inner: Arc<RwLock<Inner>>,

Review Comment:
   > Because you might have two different DynamicFilterPhysicalExpr (different 
wrapping expressions) wrapped around the same inner state... and at that point, 
the expression_id is not an "id for the expression".
   
   I think the inner state is actually the real expression. The only thing that 
may change via wrapping is the children expressions. Ex. if you call 
`reassign_expr_columns`. When you update a dynamic filter, the new expression 
is written directly into `Inner::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]

Reply via email to