Skip to content

Commit e2d9bfb

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

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,12 @@ 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+
/// # Note
281+
///
282+
/// In the unlikely scenario where this method waits indefinitely, it indicates
283+
/// a programming error where `wait_update()` is being called without any consumers
284+
/// holding a reference to the filter.
279285
pub async fn wait_update(&self) {
280286
let mut rx = self.state_watch.subscribe();
281287
// Get the current generation
@@ -292,6 +298,12 @@ impl DynamicFilterPhysicalExpr {
292298
///
293299
/// Unlike [`Self::wait_update`], this method guarantees that when it returns,
294300
/// the filter is fully complete with no more updates expected.
301+
///
302+
/// # Note
303+
///
304+
/// In the unlikely scenario where this method waits indefinitely, it indicates
305+
/// a programming error where `wait_complete()` is being called without any consumers
306+
/// holding a reference to the filter.
295307
pub async fn wait_complete(&self) {
296308
if self.inner.read().is_complete {
297309
return;

0 commit comments

Comments
 (0)