adriangb opened a new pull request, #20353:
URL: https://github.com/apache/datafusion/pull/20353

   ## Summary
   
   - Cache the result of `remap_children()` in 
`DynamicFilterPhysicalExpr::current()` to avoid redundant `transform_up()` tree 
walks on every per-batch call (`evaluate()`, `snapshot()`, etc.)
   - Use `Arc::ptr_eq` on the source expression for cache invalidation — when 
`update()` replaces the inner expression, the pointer naturally changes
   - Skip the cache entirely when `remapped_children` is `None` (no overhead on 
the producer path)
   
   ## Test plan
   
   - [x] Existing tests pass: `cargo test -p datafusion-physical-expr --lib 
expressions::dynamic_filters` (9/9 pass)
   - [x] `test_remap_children` exercises update + evaluate on two consumers 
with different remapped children, verifying correctness after cache invalidation
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


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