You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "emecii (via GitHub)" <gi...@apache.org> on 2026/09/10 04:33:10 UTC

[I] [Ruby] Fix Date values in ArrowFormat::Date32Array [arrow]

emecii opened a new issue, #51271:
URL: https://github.com/apache/arrow/issues/51271

   ### 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`):
   
   ```ruby
   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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Ruby] Fix Date values in ArrowFormat::Date32Array [arrow]

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on issue #51271:
URL: https://github.com/apache/arrow/issues/51271#issuecomment-5627878049

   Issue resolved by pull request 51272
   https://github.com/apache/arrow/pull/51272


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Ruby] Fix Date values in ArrowFormat::Date32Array [arrow]

Posted by "emecii (via GitHub)" <gi...@apache.org>.
emecii commented on issue #51271:
URL: https://github.com/apache/arrow/issues/51271#issuecomment-5613199028

   take


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Ruby] Fix Date values in ArrowFormat::Date32Array [arrow]

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou closed issue #51271: [Ruby] Fix Date values in ArrowFormat::Date32Array
URL: https://github.com/apache/arrow/issues/51271


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org