You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Wes McKinney (JIRA)" <ji...@apache.org> on 2019/01/18 16:35:00 UTC

[jira] [Commented] (ARROW-4250) [C++][Gandiva] Use approximate comparisons for floating point numbers in gandiva-projector-test

    [ https://issues.apache.org/jira/browse/ARROW-4250?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16746457#comment-16746457 ] 

Wes McKinney commented on ARROW-4250:
-------------------------------------

Of course this failure has ended up being non-deterministic. 

I'm going to add an approximate version of {{AssertArraysEqual}} in arrow_testing so that we can use that here, and anywhere where we are doing floating point comparisons where equality can be within acceptable tolerance (~1E-13 or so)

> [C++][Gandiva] Use approximate comparisons for floating point numbers in gandiva-projector-test
> -----------------------------------------------------------------------------------------------
>
>                 Key: ARROW-4250
>                 URL: https://issues.apache.org/jira/browse/ARROW-4250
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: C++, Gandiva
>            Reporter: Wes McKinney
>            Priority: Major
>             Fix For: 0.13.0
>
>
> I experienced a failure due to floating point comparison when running the release verification script for 0.12.0 RC2. 
> {code}
> [==========] Running 13 tests from 1 test case.
> [----------] Global test environment set-up.
> [----------] 13 tests from TestProjector
> [ RUN      ] TestProjector.TestProjectCache
> [       OK ] TestProjector.TestProjectCache (584 ms)
> [ RUN      ] TestProjector.TestProjectCacheFieldNames
> [       OK ] TestProjector.TestProjectCacheFieldNames (319 ms)
> [ RUN      ] TestProjector.TestProjectCacheDouble
> [       OK ] TestProjector.TestProjectCacheDouble (304 ms)
> [ RUN      ] TestProjector.TestProjectCacheFloat
> [       OK ] TestProjector.TestProjectCacheFloat (305 ms)
> [ RUN      ] TestProjector.TestIntSumSub
> [       OK ] TestProjector.TestIntSumSub (200 ms)
> [ RUN      ] TestProjector.TestAllIntTypes
> [       OK ] TestProjector.TestAllIntTypes (1945 ms)
> [ RUN      ] TestProjector.TestExtendedMath
> /tmp/arrow-0.12.0.a2ADf/apache-arrow-0.12.0/cpp/src/gandiva/tests/projector_test.cc:358: Failure
> Value of: (expected_cbrt)->Equals(outputs.at(0))
>   Actual: false
> Expected: true
> expected array: [
>   2.51984,
>   2.15443,
>   -2.41014,
>   2.02469
> ] actual array: [
>   2.51984,
>   2.15443,
>   -2.41014,
>   2.02469
> ]
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)