adriangb commented on code in PR #19937:
URL: https://github.com/apache/datafusion/pull/19937#discussion_r2717332806
##########
datafusion/physical-expr/src/expressions/dynamic_filters.rs:
##########
@@ -276,6 +276,12 @@ impl DynamicFilterPhysicalExpr {
///
/// This method will return when [`Self::update`] is called and the
generation increases.
/// It does not guarantee that the filter is complete.
+ ///
+ /// # Note
+ ///
+ /// In the unlikely scenario where this method waits indefinitely, it
indicates
+ /// a programming error where `wait_update()` is being called without any
consumers
+ /// holding a reference to the filter.
Review Comment:
I'd say something like:
> Producers (e.g.) HashJoinExec will never update the expression or mark it
as completed if there are no consumers as an optimization to avoid extra work.
If you call this method on a dynamic filter created by such a producer and
there are no consumers registered this method would wait indefinitely. This
should not happen under normal operation because if you have a reference to
this structure that means you are a consumer and hence the producer will update
the filter. If you do run into this scenario it would indicate a programming
error either in your producer or in DataFusion if the producer is a built in
node; please report the bug or open an issue explaining your use case.
--
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]