Skip to content

GH-46395: [C++][Statistics] Correct the Equal method for min and max in arrow::ArrayStatistics #46422

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

andishgar
Copy link
Contributor

@andishgar andishgar commented May 13, 2025

Rationale for this change

arrow::ArrayStatistics::Equals does not handle double values for ArrayStatistics::ValueType correctly

What changes are included in this PR?

Remove ArrayStatistics::operator==()
Add arrow::EqualOptions to arrow::ArrayStatistics::Eqauls()
Add arrow::ArrayStatistics::ApproximateEquals()

Are these changes tested?

Yes, I run the relevant unit test

Are there any user-facing changes?

Yes.
This PR includes breaking changes to public APIs. (If there are any breaking changes to public APIs, please explain which changes are breaking. If not, you can remove this.)
Remove ArrayStatistics::operator==()

@andishgar andishgar marked this pull request as draft May 13, 2025 09:25
@andishgar andishgar marked this pull request as ready for review May 13, 2025 12:44
@andishgar
Copy link
Contributor Author

@kou what is your view on arrow::ArrayStatistics::ApproximateEquals? If we aim for consistency with the Arrow C++ implementation, it seems this method should be part of it.

@kou kou changed the title GH-46395: [C++][Statistics]: Correct the Equal method for min and max in arrow::ArrayStatistics GH-46395: [C++][Statistics] Correct the Equal method for min and max in arrow::ArrayStatistics May 13, 2025
@kou
Copy link
Member

kou commented May 14, 2025

It may be better that we add is_approximate to EqualOptions than adding ApproximateEquals.

Could you start a discussion for this like #46396 ?

@andishgar
Copy link
Contributor Author

I will open an issue for discussion soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants