hcrosse opened a new pull request, #2670:
URL: https://github.com/apache/iceberg-go/pull/2670

   ## What
   
   `ToRequestedSchema` labels a `list_view` column as `large_list_view` while 
reusing its 32 bit offsets and sizes. Arrow reads each pair of `int32` entries 
as one `int64`, so the returned array is malformed.
   
   
https://github.com/apache/iceberg-go/blob/74b684cf085355bfddba0d2c74743bacd5d2eae3/table/arrow_utils.go#L1338-L1348
   
   On main, the new test's projected `list_view` column fails `ValidateFull` 
with `arrow/array: buffer 1 is too small for offset 1 and length 3`. A 
`large_list_view` column matches no case, so `ToRequestedSchema` returns `error 
encountered during schema visitor: runtime error: invalid memory address or nil 
pointer dereference`.
   
   Projection now maps `list_view` to `list_view` and `large_list_view` to 
`large_list_view`, keeping the offsets and sizes at their original width.
   
   ## Testing
   
   `TestToRequestedSchemaListView` projects a sliced column of each width 
holding a null, an empty list and a nonempty list, widens the element from int 
to long, and compares the result with the expected column under a checked 
allocator. Both subtests fail on main and pass with this change.
   
   `go test ./table/...`, `go test -race ./table/` and `golangci-lint run 
./table/...` passed.
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to