Describe the bug, including details regarding any error messages, version, and platform.
ArrowFormat::Date32Array encodes Ruby Date values with Date#day, which is the day of the month. Arrow Date32 values must be the number of days since the Unix epoch. This also affects ArrowFormat::Array.build, which infers Date32Array for Date values.
On current main (df40dd400):
require "date"
require "arrow-format"
value = Date.new(2026, 7, 17)
array = ArrowFormat::Array.build([value])
p array.to_a
# Actual: [17]
# Expected: [20651]
The existing ArrayBuilder date test compares against another Date32Array built from the same Date, so both sides pass through the same incorrect conversion and the regression is not detected.
Component(s)
Ruby
Describe the bug, including details regarding any error messages, version, and platform.
ArrowFormat::Date32Arrayencodes RubyDatevalues withDate#day, which is the day of the month. Arrow Date32 values must be the number of days since the Unix epoch. This also affectsArrowFormat::Array.build, which infersDate32ArrayforDatevalues.On current
main(df40dd400):The existing ArrayBuilder date test compares against another
Date32Arraybuilt from the sameDate, so both sides pass through the same incorrect conversion and the regression is not detected.Component(s)
Ruby