berkaysynnada commented on issue #8078:
URL: 
https://github.com/apache/arrow-datafusion/issues/8078#issuecomment-1801750904

   > I think there is a mismatch between the current use of 
`Precision::Inexact` and its documentation
   > 
   > Specifically, `Precision::Inexact` appears to be treated as a 
"conservative estimate" in several places (which is actually what we need in 
IOx), so perhaps another option would be to rename `Precision::Exact` to 
`Precision::Conservative` and document that it is a conservative estimate of 
the actual value 🤔
   > 
   
   I think the documentation is correct but you have found 2 bugs in the code:
   1) Here, we must ensure the values are exact.
   
https://github.com/apache/arrow-datafusion/blob/87aeef5aa4d8f38a8328f8e51e530e6c9cd9afa9/datafusion/core/src/datasource/statistics.rs#L69-L73
   
   2) Singleton check must be for exact values only.
   
https://github.com/apache/arrow-datafusion/blob/c3430d71179d68536008cd7272f4f57b7f50d4a2/datafusion/statistics/src/statistics.rs#L281-L286
   
   I will open a PR now fixing these issues.
   
   


-- 
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]

Reply via email to