Copilot commented on code in PR #49657:
URL: https://github.com/apache/arrow/pull/49657#discussion_r3031784006


##########
ruby/red-arrow-format/lib/arrow-format/array.rb:
##########
@@ -140,8 +140,8 @@ def slice_offsets_buffer(id, buffer, buffer_type)
   end
 
   class NullArray < Array
-    def initialize(type, size)
-      super(type, size, nil)
+    def initialize(size)
+      super(NullType.singleton, size, nil)
     end

Review Comment:
   `NullArray` (and other arrays in this file) now hard-depend on 
`*Type.singleton` constants (e.g., `NullType.singleton`) but `array.rb` doesn’t 
`require_relative "type"`. This makes `require "arrow-format/array"` (or any 
changed load order) fragile and can raise `NameError` when these constructors 
are called before `type.rb` is loaded. Consider making the dependency explicit 
by requiring `type` from this file (or otherwise ensuring types are loaded 
before these constructors can run).



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