mustafasrepo commented on code in PR #7566:
URL: https://github.com/apache/arrow-datafusion/pull/7566#discussion_r1328358901
##########
datafusion/physical-expr/src/analysis.rs:
##########
@@ -191,12 +191,15 @@ fn shrink_boundaries(
})?;
let final_result = graph.get_interval(*root_index);
+ // If during selectivity calculation we encounter an error, use 1.0 as
cardinality estimate
+ // safest estimate(e.q largest possible value).
let selectivity = calculate_selectivity(
&final_result.lower.value,
&final_result.upper.value,
&target_boundaries,
&initial_boundaries,
- )?;
+ )
+ .unwrap_or(1.0);
Review Comment:
I agree with you. I will remove this error ignoring, in the subsequent PR,
where I will
- remove Statistics::default
- Remove `unwrap_or`, error ignoring.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]