berkaysynnada commented on code in PR #9007:
URL: https://github.com/apache/arrow-datafusion/pull/9007#discussion_r1468485697
##########
datafusion/physical-plan/src/joins/utils.rs:
##########
@@ -955,7 +955,12 @@ fn max_distinct_count(
let result = match num_rows {
Precision::Absent => Precision::Absent,
Precision::Inexact(count) => {
- Precision::Inexact(count -
stats.null_count.get_value().unwrap_or(&0))
+ // To safeguard against inexact number of rows (e.g. 0)
being smaller than
+ // an exact null count we need to do a checked subtraction.
+ match
count.checked_sub(*stats.null_count.get_value().unwrap_or(&0)) {
+ None => Precision::Inexact(0),
Review Comment:
This issue has been out of my focus for a while. I can help those who wish
to take it on and make progress. Unfortunately, addressing this issue is not in
my short-term plans.
--
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]