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

[Python] pa.decimal128 should validate inputs

    XMLWordPrintableJSON

Details

    Description

      The precision shouldn't be higher than 38, but 39 is happily accepted currently:

      >>> ty = pa.decimal128(39, 0)                                                                            
      >>> arr = pa.array([2**127], type=ty)                                                                  
      >>> arr                                                                                                  
      <pyarrow.lib.Decimal128Array object at 0x7f9b89444138>
      [
        -170141183460469231731687303715884105728
      ]
      

      Attachments

        Issue Links

          Activity

            People

              apitrou Antoine Pitrou
              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