Skip to content

Commit a2548c2

Browse files
committed
adjust comments
1 parent a553320 commit a2548c2

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

datafusion/physical-plan/src/filter.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -312,9 +312,8 @@ impl FilterExec {
312312
/// Calculates `Statistics` for `FilterExec`, by applying selectivity
313313
/// (either default, or estimated) to input statistics.
314314
///
315-
/// Equality predicates (`col = literal`) set NDV=Exact(1) via direct
316-
/// pattern matching, covering types where interval analysis cannot
317-
/// collapse the interval (strings, timestamps, etc.).
315+
/// Equality predicates (`col = literal`) set NDV to `Exact(1)`, or
316+
/// `Exact(0)` when the predicate is contradictory (e.g. `a = 1 AND a = 2`).
318317
fn statistics_helper(
319318
schema: &SchemaRef,
320319
input_stats: Statistics,
@@ -790,8 +789,8 @@ impl EmbeddedProjection for FilterExec {
790789
/// non-null literals (e.g. `name = 'alice' AND name = 'bob'`), which is
791790
/// always unsatisfiable.
792791
///
793-
/// Only recurses through AND (via `split_conjunction`); OR is intentionally
794-
/// not traversed since `a = 1 OR a = 2` does not pin NDV to 1.
792+
/// Only AND conjunctions are traversed; OR is intentionally skipped
793+
/// since `a = 1 OR a = 2` does not pin NDV to 1.
795794
fn collect_equality_columns(
796795
predicate: &Arc<dyn PhysicalExpr>,
797796
) -> (HashMap<usize, ScalarValue>, bool) {

0 commit comments

Comments
 (0)