Skip to content

[Ruby] Cannot work with zero-value Decimals #43877

@datbth

Description

@datbth

Describe the bug, including details regarding any error messages, version, and platform.

Description

image

schema = Arrow::Schema.new([Arrow::Field.new('x', {type: :decimal128,precision: 38,scale:9})])
table = Arrow::Table.new(schema, [[BigDecimal(0)]])
puts table[0][0].class

image

(In my actual use case, I'm working with data coming from Flight RPC.
But as far as I see, the Ruby Flight client also ingests decimal data using the string representation)

Not sure if we can do something here or do we have to wait for a patch from Ruby BigDecimal?
I have also filed an issue on Ruby BigDecimal: ruby/bigdecimal#301

Additional details

  • Ruby: 2.7.4p191 [x86_64-linux]
  • Platform: Ubuntu 24.04
  • red-arrow: 17.0.0
  • bigdecimal: 3.1.7

Component(s)

Ruby

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions