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


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

Review Comment:
   ```suggestion
       UNIX_EPOCH = Date.new(1970, 1, 1).jd
   ```



##########
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:
   We can detect this case by the added `test_date` test in 
`test-date32-array.rb`, right?
   
   If so, could you revert this change? We want to check `Date32Array.new == 
Array.build` here.



-- 
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