Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-6120

[C++][Gandiva] including some headers causes decimal_test to fail

    XMLWordPrintableJSON

Details

    Description

      It seems this is due to precompiled code being contaminated with undesired headers

      For example, #include <iostream> in arrow/compare.h causes:

      [ RUN      ] TestDecimal.TestCastFunctions
      ../../src/gandiva/tests/decimal_test.cc:478: Failure
      Value of: (array_dec)->Equals(outputs[2], arrow::EqualOptions().nans_equal(true))
        Actual: false
      Expected: true
      expected array: [
        1.23,
        1.58,
        -1.23,
        -1.58
      ] actual array: [
        0.00,
        0.00,
        0.00,
        0.00
      ]
      ../../src/gandiva/tests/decimal_test.cc:481: Failure
      Value of: (array_dec)->Equals(outputs[2], arrow::EqualOptions().nans_equal(true))
        Actual: false
      Expected: true
      expected array: [
        1.23,
        1.58,
        -1.23,
        -1.58
      ] actual array: [
        0.00,
        0.00,
        0.00,
        0.00
      ]
      ../../src/gandiva/tests/decimal_test.cc:484: Failure
      Value of: (array_dec)->Equals(outputs[3], arrow::EqualOptions().nans_equal(true))
        Actual: false
      Expected: true
      expected array: [
        1.23,
        1.58,
        -1.23,
        -1.58
      ] actual array: [
        0.00,
        0.00,
        0.00,
        0.00
      ]
      ../../src/gandiva/tests/decimal_test.cc:497: Failure
      Value of: (array_float64)->Equals(outputs[6], arrow::EqualOptions().nans_equal(true))
        Actual: false
      Expected: true
      expected array: [
        1.23,
        1.58,
        -1.23,
        -1.58
      ] actual array: [
        inf,
        inf,
        -inf,
        -inf
      ]
      [  FAILED  ] TestDecimal.TestCastFunctions (134 ms)
      

      Attachments

        Issue Links

          Activity

            People

              wesm Wes McKinney
              bkietz Ben Kietzman
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m