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

[C++][Gandiva] castDATE_date32() may cause overflow

    XMLWordPrintableJSON

Details

    Description

      The following code in `cpp/src/gandiva/precompiled/time.cc` may cause overflow since `int32` * `int32` is `int32`, then it is converted to `int64`. The result of `int32` may loose the part of the result of the multiplication

       

      gdv_date64 castDATE_date32(gdv_date32 days) { return days * MILLIS_IN_DAY; } 

      Attachments

        Issue Links

          Activity

            People

              kiszk Kazuaki Ishizaki
              kiszk Kazuaki Ishizaki
              Votes:
              0 Vote for this issue
              Watchers:
              3 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 - 40m
                  40m