Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion datafusion/physical-expr/src/analysis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ pub fn analyze(
"ExprBoundaries has a non-zero distinct count although it represents an empty table"
);
assert_or_internal_err!(
context.selectivity == Some(0.0),
context.selectivity.unwrap_or(0.0) == 0.0,
"AnalysisContext has a non-zero selectivity although it represents an empty table"
);
Ok(context)
Expand Down
9 changes: 9 additions & 0 deletions datafusion/sqllogictest/test_files/select.slt
Original file line number Diff line number Diff line change
Expand Up @@ -1926,3 +1926,12 @@ select "current_time" is not null from t_with_current_time;
true
false
true

# https://github.com/apache/datafusion/issues/20215
statement count 0
CREATE TABLE t0;

query I
SELECT COUNT(*) FROM t0 AS tt0 WHERE (4==(3/0));
----
0