Skip to content

Commit abc077a

Browse files
committed
Add comment on error
1 parent fd12f0f commit abc077a

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

datafusion/physical-expr/src/expressions/dynamic_filters.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,10 @@ impl DynamicFilterPhysicalExpr {
276276
///
277277
/// This method will return when [`Self::update`] is called and the generation increases.
278278
/// It does not guarantee that the filter is complete.
279+
///
280+
/// Producers (e.g.) HashJoinExec may never update the expression or mark it as completed if there are no consumers.
281+
/// 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.
282+
/// This should not happen under normal operation and would indicate a programming error either in your producer or in DataFusion if the producer is a built in node.
279283
pub async fn wait_update(&self) {
280284
let mut rx = self.state_watch.subscribe();
281285
// Get the current generation
@@ -292,6 +296,10 @@ impl DynamicFilterPhysicalExpr {
292296
///
293297
/// Unlike [`Self::wait_update`], this method guarantees that when it returns,
294298
/// the filter is fully complete with no more updates expected.
299+
///
300+
/// Producers (e.g.) HashJoinExec may never update the expression or mark it as completed if there are no consumers.
301+
/// 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.
302+
/// This should not happen under normal operation and would indicate a programming error either in your producer or in DataFusion if the producer is a built in node.
295303
pub async fn wait_complete(&self) {
296304
if self.inner.read().is_complete {
297305
return;

0 commit comments

Comments
 (0)