-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[C++] During unit testing, the float array contains nan equality judgment #38624
Comments
|
Sorry, I know this parameter, but I can't pass it during unit testing, such as ASSERT_TABLES_EQUAL |
Yeah I think it's a bug because when comparing arrays we use the |
I agree it's a bug, lets fixing this |
right. |
bkietz
pushed a commit
that referenced
this issue
Nov 15, 2023
…8642) ### Rationale for this change some other interfaces lack equal options, suck as nan equal, so we add TestingEqualOptions for each function and add some testing. ### What changes are included in this PR? gtest_util related. ### Are these changes tested? gtest_util.cc ### Are there any user-facing changes? yes. * Closes: #38624 Authored-by: light-city <455954986@qq.com> Signed-off-by: Benjamin Kietzman <bengilgit@gmail.com>
dgreiss
pushed a commit
to dgreiss/arrow
that referenced
this issue
Feb 19, 2024
…s. (apache#38642) ### Rationale for this change some other interfaces lack equal options, suck as nan equal, so we add TestingEqualOptions for each function and add some testing. ### What changes are included in this PR? gtest_util related. ### Are these changes tested? gtest_util.cc ### Are there any user-facing changes? yes. * Closes: apache#38624 Authored-by: light-city <455954986@qq.com> Signed-off-by: Benjamin Kietzman <bengilgit@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug, including details regarding any error messages, version, and platform.
The default array options now have a nan comparison of false, but in a unit test situation we might expect nan=true.
for example:
Now the test will fail.
The reasons were found to be as follows:
So how can I modify the interface to support this function?
since ASSERT_TABLES_EQUAL will invoke ChunkedArray::ApproxEquals funciton.There is no way to pass options here
Component(s)
C++
The text was updated successfully, but these errors were encountered: