Skip to content

Commit d2b0fc3

Browse files
committed
fmt
1 parent f645af1 commit d2b0fc3

1 file changed

Lines changed: 18 additions & 19 deletions

File tree

datafusion/physical-plan/src/filter.rs

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -325,27 +325,26 @@ impl FilterExec {
325325
let num_rows = input_stats.num_rows;
326326
let total_byte_size = input_stats.total_byte_size;
327327

328-
let (selectivity, mut column_statistics) =
329-
if !check_support(predicate, schema) {
330-
(
331-
default_selectivity as f64 / 100.0,
332-
input_stats.to_inexact().column_statistics,
333-
)
334-
} else {
335-
let input_analysis_ctx = AnalysisContext::try_from_statistics(
328+
let (selectivity, mut column_statistics) = if !check_support(predicate, schema) {
329+
(
330+
default_selectivity as f64 / 100.0,
331+
input_stats.to_inexact().column_statistics,
332+
)
333+
} else {
334+
let input_analysis_ctx = AnalysisContext::try_from_statistics(
335+
schema,
336+
&input_stats.column_statistics,
337+
)?;
338+
let analysis_ctx = analyze(predicate, input_analysis_ctx, schema)?;
339+
(
340+
analysis_ctx.selectivity.unwrap_or(1.0),
341+
collect_new_statistics(
336342
schema,
337343
&input_stats.column_statistics,
338-
)?;
339-
let analysis_ctx = analyze(predicate, input_analysis_ctx, schema)?;
340-
(
341-
analysis_ctx.selectivity.unwrap_or(1.0),
342-
collect_new_statistics(
343-
schema,
344-
&input_stats.column_statistics,
345-
analysis_ctx.boundaries,
346-
),
347-
)
348-
};
344+
analysis_ctx.boundaries,
345+
),
346+
)
347+
};
349348

350349
// Estimate (inexact) selectivity of predicate
351350
let num_rows = num_rows.with_estimated_selectivity(selectivity);

0 commit comments

Comments
 (0)