Skip to content

Commit 98b5a72

Browse files
committed
Add reference
1 parent 0d70df9 commit 98b5a72

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ use datafusion_expr::ColumnarValue;
3232
use datafusion_physical_expr_common::physical_expr::{DynEq, DynHash};
3333

3434
/// A dynamic [`PhysicalExpr`] that can be updated by anyone with a reference to it.
35+
///
36+
/// Any `ExecutionPlan` that uses this expression and holds a reference to it internally should probably also
37+
/// implement `ExecutionPlan::reset_state` to remain compatible with recursive queries and other situations where
38+
/// the same `ExecutionPlan` is reused with different data.
3539
#[derive(Debug)]
3640
pub struct DynamicFilterPhysicalExpr {
3741
/// The original children of this PhysicalExpr, if any.
@@ -120,6 +124,10 @@ impl DynamicFilterPhysicalExpr {
120124
/// Generally the important bit is that the *leaf children that reference columns
121125
/// do not change* since those will be used to determine what columns need to read or projected
122126
/// when evaluating the expression.
127+
///
128+
/// Any `ExecutionPlan` that uses this expression and holds a reference to it internally should probably also
129+
/// implement `ExecutionPlan::reset_state` to remain compatible with recursive queries and other situations where
130+
/// the same `ExecutionPlan` is reused with different data.
123131
///
124132
/// [`collect_columns`]: crate::utils::collect_columns
125133
pub fn new(

0 commit comments

Comments
 (0)