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

[C++] add_checked doesn't error out on duration overflow

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 7.0.0
    • 8.0.0
    • C++

    Description

      Example in Python:

      >>> pa.compute.add_checked(pa.array([2**62], type=pa.duration('ms')), pa.array([2**62], type=pa.duration('ms')))
      <pyarrow.lib.DurationArray object at 0x7f1539465b80>
      [
        -9223372036854775808
      ]
      

      The same computation with plain integers correctly raises an error:

      >>> pa.compute.add_checked(pa.array([2**62], type=pa.int64()), pa.array([2**62], type=pa.int64()))
      Traceback (most recent call last):
        [...]
      ArrowInvalid: overflow
      

      Attachments

        Issue Links

          Activity

            People

              rokm Rok Mihevc
              apitrou Antoine Pitrou
              Votes:
              0 Vote for this issue
              Watchers:
              2 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 - 1h 40m
                  1h 40m