You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "mapleFU (via GitHub)" <gi...@apache.org> on 2023/05/16 06:51:13 UTC

[GitHub] [arrow] mapleFU opened a new issue, #35606: [CI][C++] TestDecimalFromReal for Float type failed in "AMD64 Windows MinGW MINGW32 C++"

mapleFU opened a new issue, #35606:
URL: https://github.com/apache/arrow/issues/35606

   ### Describe the bug, including details regarding any error messages, version, and platform.
   
   The error messages is listed below:
   
   ```
   [----------] 2 tests from TestDecimalFromReal/1, where TypeParam = std::pair<arrow::Decimal128, double>
   [ RUN      ] TestDecimalFromReal/1.TestSuccess
   D:/a/arrow/arrow/cpp/src/arrow/util/decimal_test.cc:766: Failure
   Expected equality of these values:
     dec.ToString(scale)
       Which is: "4611686000000000000"
     expected
       Which is: "4611686018427387904"
   D:/a/arrow/arrow/cpp/src/arrow/util/decimal_test.cc:766: Failure
   Expected equality of these values:
     dec.ToString(scale)
       Which is: "-4611686000000000000"
     expected
       Which is: "-4611686018427387904"
   D:/a/arrow/arrow/cpp/src/arrow/util/decimal_test.cc:766: Failure
   Expected equality of these values:
     dec.ToString(scale)
       Which is: "9223372000000000000"
     expected
       Which is: "9223372036854775808"
   D:/a/arrow/arrow/cpp/src/arrow/util/decimal_test.cc:766: Failure
   Expected equality of these values:
     dec.ToString(scale)
       Which is: "-9223372000000000000"
     expected
       Which is: "-9223372036854775808"
   D:/a/arrow/arrow/cpp/src/arrow/util/decimal_test.cc:766: Failure
   Expected equality of these values:
     dec.ToString(scale)
       Which is: "18446744000000000000"
     expected
       Which is: "18446744073709551616"
   D:/a/arrow/arrow/cpp/src/arrow/util/decimal_test.cc:766: Failure
   Expected equality of these values:
     dec.ToString(scale)
       Which is: "-18446744000000000000"
     expected
       Which is: "-18446744073709551616"
   [  FAILED  ] TestDecimalFromReal/1.TestSuccess, where TypeParam = std::pair<arrow::Decimal128, double> (0 ms)
   [ RUN      ] TestDecimalFromReal/1.TestErrors
   [       OK ] TestDecimalFromReal/1.TestErrors (0 ms)
   [----------] 2 tests from TestDecimalFromReal/1 (0 ms total)
   
   [----------] 2 tests from TestDecimalFromReal/2, where TypeParam = std::pair<arrow::Decimal256, float>
   [ RUN      ] TestDecimalFromReal/2.TestSuccess
   [       OK ] TestDecimalFromReal/2.TestSuccess (0 ms)
   [ RUN      ] TestDecimalFromReal/2.TestErrors
   [       OK ] TestDecimalFromReal/2.TestErrors (0 ms)
   [----------] 2 tests from TestDecimalFromReal/2 (0 ms total)
   
   [----------] 2 tests from TestDecimalFromReal/3, where TypeParam = std::pair<arrow::Decimal256, double>
   [ RUN      ] TestDecimalFromReal/3.TestSuccess
   D:/a/arrow/arrow/cpp/src/arrow/util/decimal_test.cc:766: Failure
   Expected equality of these values:
     dec.ToString(scale)
       Which is: "4611686000000000000"
     expected
       Which is: "4611686018427387904"
   D:/a/arrow/arrow/cpp/src/arrow/util/decimal_test.cc:766: Failure
   Expected equality of these values:
     dec.ToString(scale)
       Which is: "-4611686000000000000"
     expected
       Which is: "-4611686018427387904"
   D:/a/arrow/arrow/cpp/src/arrow/util/decimal_test.cc:766: Failure
   Expected equality of these values:
     dec.ToString(scale)
       Which is: "9223372000000000000"
     expected
       Which is: "9223372036854775808"
   D:/a/arrow/arrow/cpp/src/arrow/util/decimal_test.cc:766: Failure
   Expected equality of these values:
     dec.ToString(scale)
       Which is: "-9223372000000000000"
     expected
       Which is: "-9223372036854775808"
   D:/a/arrow/arrow/cpp/src/arrow/util/decimal_test.cc:766: Failure
   Expected equality of these values:
     dec.ToString(scale)
       Which is: "18446744000000000000"
     expected
       Which is: "18446744073709551616"
   D:/a/arrow/arrow/cpp/src/arrow/util/decimal_test.cc:766: Failure
   Expected equality of these values:
     dec.ToString(scale)
       Which is: "-18446744000000000000"
     expected
       Which is: "-18446744073709551616"
   [  FAILED  ] TestDecimalFromReal/3.TestSuccess, where TypeParam = std::pair<arrow::Decimal256, double> (0 ms)
   [ RUN      ] TestDecimalFromReal/3.TestErrors
   ```
   
   (1) (3) in `TestDecimalFromReal` are all float. So I guess there would be something wrong when handling float type. The CI can be seen here: https://github.com/apache/arrow/actions/runs/4988181428/jobs/8930665332?pr=35605
   
   ### Component(s)
   
   C++, Continuous Integration


-- 
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: issues-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] mapleFU commented on issue #35606: [CI][C++] TestDecimalFromReal for Float type failed in "AMD64 Windows MinGW MINGW32 C++"

Posted by "mapleFU (via GitHub)" <gi...@apache.org>.
mapleFU commented on issue #35606:
URL: https://github.com/apache/arrow/issues/35606#issuecomment-1553254203

   ```c++
   // Common tests for Decimal128::FromReal(T, ...) and Decimal256::FromReal(T, ...)
   template <typename T>
   class TestDecimalFromReal : public ::testing::Test {
    public:
     using Decimal = typename T::first_type;
     using Real = typename T::second_type;
     using ParamType = FromRealTestParam<Real>;
   
     void TestSuccess() {
       const std::vector<ParamType> params{
           // clang-format off
           {0.0f, 1, 0, "0"},
           {-0.0f, 1, 0, "0"},
           {0.0f, 19, 4, "0.0000"},
           {-0.0f, 19, 4, "0.0000"},
           {123.0f, 7, 4, "123.0000"},
           {-123.0f, 7, 4, "-123.0000"},
           {456.78f, 7, 4, "456.7800"},
           {-456.78f, 7, 4, "-456.7800"},
           {456.784f, 5, 2, "456.78"},
           {-456.784f, 5, 2, "-456.78"},
           {456.786f, 5, 2, "456.79"},
           {-456.786f, 5, 2, "-456.79"},
           {999.99f, 5, 2, "999.99"},
           {-999.99f, 5, 2, "-999.99"},
           {123.0f, 19, 0, "123"},
           {-123.0f, 19, 0, "-123"},
           {123.4f, 19, 0, "123"},
           {-123.4f, 19, 0, "-123"},
           {123.6f, 19, 0, "124"},
           {-123.6f, 19, 0, "-124"},
           // 2**62
           {4.611686e+18f, 19, 0, "4611686018427387904"},
           {-4.611686e+18f, 19, 0, "-4611686018427387904"},
           // 2**63
           {9.223372e+18f, 19, 0, "9223372036854775808"},
           {-9.223372e+18f, 19, 0, "-9223372036854775808"},
           // 2**64
           {1.8446744e+19f, 20, 0, "18446744073709551616"},
           {-1.8446744e+19f, 20, 0, "-18446744073709551616"}
           // clang-format on
       };
       for (const ParamType& param : params) {
         CheckDecimalFromReal<Decimal>(param.real, param.precision, param.scale,
                                       param.expected);
       }
     }
   ```
   
   Here meets:
   
   ```c++
           // 2**62
           {4.611686e+18f, 19, 0, "4611686018427387904"},
           {-4.611686e+18f, 19, 0, "-4611686018427387904"},
           // 2**63
           {9.223372e+18f, 19, 0, "9223372036854775808"},
           {-9.223372e+18f, 19, 0, "-9223372036854775808"},
           // 2**64
           {1.8446744e+19f, 20, 0, "18446744073709551616"},
           {-1.8446744e+19f, 20, 0, "-18446744073709551616"}
   ```
   
   These values would be truncated on MinGW when type is `float`


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] mapleFU commented on issue #35606: [CI][C++] TestDecimalFromReal for Float type failed in "AMD64 Windows MinGW MINGW32 C++"

Posted by "mapleFU (via GitHub)" <gi...@apache.org>.
mapleFU commented on issue #35606:
URL: https://github.com/apache/arrow/issues/35606#issuecomment-1549085423

   @pitrou Mind take a look?


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] mapleFU commented on issue #35606: [CI][C++] TestDecimalFromReal for Float type failed in "AMD64 Windows MinGW MINGW32 C++"

Posted by "mapleFU (via GitHub)" <gi...@apache.org>.
mapleFU commented on issue #35606:
URL: https://github.com/apache/arrow/issues/35606#issuecomment-1553062596

   > Is this closed by https://github.com/apache/arrow/pull/35605 / https://github.com/apache/arrow/issues/35571 ?
   
   @westonpace I think they're different problems


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] pitrou closed issue #35606: [CI][C++] TestDecimalFromReal for Float type failed in "AMD64 Windows MinGW MINGW32 C++"

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou closed issue #35606: [CI][C++] TestDecimalFromReal for Float type failed in "AMD64 Windows MinGW MINGW32 C++"
URL: https://github.com/apache/arrow/issues/35606


-- 
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: issues-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] pitrou commented on issue #35606: [CI][C++] TestDecimalFromReal for Float type failed in "AMD64 Windows MinGW MINGW32 C++"

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on issue #35606:
URL: https://github.com/apache/arrow/issues/35606#issuecomment-1549226949

   Where is your hotfix?


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] mapleFU commented on issue #35606: [CI][C++] TestDecimalFromReal for Float type failed in "AMD64 Windows MinGW MINGW32 C++"

Posted by "mapleFU (via GitHub)" <gi...@apache.org>.
mapleFU commented on issue #35606:
URL: https://github.com/apache/arrow/issues/35606#issuecomment-1549230366

   ( https://github.com/apache/arrow/pull/35605 . Just for float point and parquet decryption, not for this issue )


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] kou commented on issue #35606: [CI][C++] TestDecimalFromReal for Float type failed in "AMD64 Windows MinGW MINGW32 C++"

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on issue #35606:
URL: https://github.com/apache/arrow/issues/35606#issuecomment-1550491329

   I tried this on my MSYS2 environment but this is not reproduced...
   Anyway, I'll take a look at this.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] westonpace commented on issue #35606: [CI][C++] TestDecimalFromReal for Float type failed in "AMD64 Windows MinGW MINGW32 C++"

Posted by "westonpace (via GitHub)" <gi...@apache.org>.
westonpace commented on issue #35606:
URL: https://github.com/apache/arrow/issues/35606#issuecomment-1553057452

   Is this closed by #35605 / #35571 ?


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] pitrou commented on issue #35606: [CI][C++] TestDecimalFromReal for Float type failed in "AMD64 Windows MinGW MINGW32 C++"

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on issue #35606:
URL: https://github.com/apache/arrow/issues/35606#issuecomment-1549218359

   Also cc @kou since it's MinGW-related.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] mapleFU commented on issue #35606: [CI][C++] TestDecimalFromReal for Float type failed in "AMD64 Windows MinGW MINGW32 C++"

Posted by "mapleFU (via GitHub)" <gi...@apache.org>.
mapleFU commented on issue #35606:
URL: https://github.com/apache/arrow/issues/35606#issuecomment-1549223771

   Yes, https://github.com/apache/arrow/issues/35571 is also MinGW-related. I guess they have similiar reason. I submit a hotfix but I guess maybe we'd better find the root cause


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] pitrou commented on issue #35606: [CI][C++] TestDecimalFromReal for Float type failed in "AMD64 Windows MinGW MINGW32 C++"

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on issue #35606:
URL: https://github.com/apache/arrow/issues/35606#issuecomment-1549218038

   These tests haven't changed in a while AFAIK, and they used to pass on MinGW. If possible it would be nice to research the GHA history and find out at which point they started failing.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] kou commented on issue #35606: [CI][C++] TestDecimalFromReal for Float type failed in "AMD64 Windows MinGW MINGW32 C++"

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on issue #35606:
URL: https://github.com/apache/arrow/issues/35606#issuecomment-1553852705

   I could reproduce this.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org