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

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   When creating an `Arrow::Table` from a Ruby Hash where a column contains 
nested arrays of Integer values, the element type of the list is inferred as 
`int8` even when the values are outside the `int8` range.
   
   In the reproduction below, the input includes values `±65536`, but the 
schema still becomes `list<item: int8>`.
   
   Related: #48478 (nested non-negative integers inferred as string)
   
   ### Steps to reproduce the bug
   
   ```ruby
   require "arrow"
   
   p Arrow::Table.new(val: [[2**16, -1], [-2**16]]).schema
   # Actual:
   # #<Arrow::Schema:... val: list<item: int8>>
   ```
   
   ### Expected behavior
   
   The list element type should be widened based on the values.
 For this 
reproduction, I would expect at least `list<item: int32>` (since `±65536` does 
not fit in `int16`).
   
   ### Actual behavior
   
   The schema is inferred as `val: list<item: int8>`.
   
   ### Environment
   
   * OS: macOS 26.1
   * CPU arch: Apple M4 Pro
   * Ruby: 3.4.7
   * Gems: red-arrow 22.0.0
   * Arrow installation method: Homebrew
   
   ### 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: [email protected]

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

Reply via email to