File tree Expand file tree Collapse file tree
datafusion/physical-plan/src Expand file tree Collapse file tree Original file line number Diff line number Diff 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.
795794fn collect_equality_columns (
796795 predicate : & Arc < dyn PhysicalExpr > ,
797796) -> ( HashMap < usize , ScalarValue > , bool ) {
You can’t perform that action at this time.
0 commit comments