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

[Ruby] ArrayBuilder doesn't work correctly with Decimal

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 9.0.0
    • Ruby

    Description

      When trying to convert raw data with decimal values to Arrow::Table error received

       

      Arrow::Table.new(x: [BigDecimal('1.1')])
      ArgumentError: wrong arguments: Arrow::Decimal128ArrayBuilder#initialize(): available signatures: (data_type: interface(Arrow::Decimal128DataType(GArrowDecimal128DataType)))
      

      I guess this is because Decimal128ArrayBuilder expects Decimal128DataType in initialiser, however I'm not sure how to correctly and effectively detect precision and scale from array of BigDecimal

       

      Arrow::VERSION
      => "5.0.0"

      Attachments

        Issue Links

          Activity

            People

              kou Kouhei Sutou
              simpl1g Kanstantsin Ilchanka
              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 - 2.5h
                  2.5h