paveon opened a new pull request, #1440:
URL: https://github.com/apache/arrow-go/pull/1440

   ### Rationale for this change
   
   `arrow.TypeEqual` has a case for `*ListType` but none for `*LargeListType`, 
so large lists fall through to `reflect.DeepEqual`. That compares the element 
field's metadata even when `CheckMetadata` is not given, and it also tells 
`nil` metadata apart from empty metadata. Two large list types that print 
identically can therefore compare unequal, and `array.Concatenate` rejects 
their arrays with "arrays to be concatenated must be identically typed".
   
   We hit this while concatenating batches read with iceberg-go's 
`arrow.use_large_types` scan option: a column read from a Parquet file and the 
same column filled with nulls for a file that predates it end up with element 
fields whose metadata differs only in being `nil` or empty.
   
   ### What changes are included in this PR?
   
   A `*LargeListType` case in `TypeEqual`, identical to the `*ListType` one: 
compare the element types, compare element metadata only with `CheckMetadata`, 
and compare element nullability.
   
   `*LargeListViewType` also has no case and falls through to 
`reflect.DeepEqual`; this PR leaves it unchanged.
   
   ### Are these changes tested?
   
   Yes. `TestTypeEqual` gains list and large list cases for element metadata 
(`nil` vs. empty, differing values with and without `CheckMetadata`), element 
nullability, and list vs. large list. The large list metadata cases fail 
without the fix.
   
   ### Are there any user-facing changes?
   
   `TypeEqual` now reports large list types equal when they differ only in 
element field metadata and `CheckMetadata` is not set, as it already does for 
list types.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


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