emecii commented on code in PR #51272:
URL: https://github.com/apache/arrow/pull/51272#discussion_r3980981359


##########
ruby/red-arrow-format/test/test-array-builder.rb:
##########
@@ -144,7 +144,8 @@ def test_time
 
   def test_date
     values = [Date.new(2026, 7, 17)]
-    assert_equal(ArrowFormat::Date32Array.new(values),
-                 ArrowFormat::Array.build(values))
+    array = ArrowFormat::Array.build(values)
+    assert_equal(ArrowFormat::Date32Array, array.class)
+    assert_equal([20651], array.to_a)

Review Comment:
   Yes. `TestDate32Array#test_date` covers the Date conversion path (including 
pre-epoch, epoch, `nil`, and a modern date), so I restored the original 
`Date32Array.new == Array.build` assertion in b848efba51. Focused suites pass: 
8/8 Date32 tests and 22/22 array-builder tests.



##########
ruby/red-arrow-format/lib/arrow-format/array.rb:
##########
@@ -489,11 +489,12 @@ def type
     end
 
     private
+    UNIX_EPOCH = 2440588

Review Comment:
   Applied in b848efba51. I also added the explicit stdlib `date` require 
because this constant is evaluated while loading `arrow-format`; standalone 
loading and epoch conversion now pass, along with both focused suites.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to