Skip to content

Commit 056faa0

Browse files
committed
more comments
1 parent 9771f67 commit 056faa0

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

datafusion/physical-expr-common/src/physical_expr.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,10 @@ pub trait PhysicalExpr: Send + Sync + Display + Debug + DynEq + DynHash {
316316
/// or needs to serialize this state to bytes may not be able to handle these dynamic references.
317317
/// In such cases, we should return a simplified version of the `PhysicalExpr` that does not
318318
/// contain these dynamic references.
319+
///
320+
/// Systems that implement remote execution of plans, e.g. serialize a portion of the query plan
321+
/// and send it across the wire to a remote executor may want to call this method after
322+
/// every batch on the source side and brodcast / update the current snaphot to the remote executor.
319323
///
320324
/// Note for implementers: this method should *not* handle recursion.
321325
/// Recursion is handled in [`snapshot_physical_expr`].

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,13 @@ use datafusion_physical_expr_common::physical_expr::{DynEq, DynHash};
3636
/// During query execution, operators implementing this trait can provide
3737
/// filter expressions that other operators can use to dynamically prune data.
3838
///
39-
/// See `TopKDynamicFilterSource` in datafusion/physical-plan/src/topk/mod.rs for examples.
39+
/// For example:
40+
/// - A `HashJoin` operator can use this to provide a filter expression
41+
/// that filters out rows from the right side of the join based on the
42+
/// values from the left side.
43+
/// - A `TopK` operator can use this to provide a filter expression
44+
/// that filters out rows from the input based on the values from the
45+
/// top K rows.
4046
pub trait DynamicFilterSource:
4147
Send + Sync + std::fmt::Debug + DynEq + DynHash + Display + 'static
4248
{

0 commit comments

Comments
 (0)