iceberg-kitten opened a new issue, #2668: URL: https://github.com/apache/iceberg-go/issues/2668
### Apache Iceberg version main (development) ### Please describe the bug 🐞 #### Why `table.WriteRecords` can panic when writing a bucket-partitioned Iceberg `long` from an Arrow `Int32`, `Int16`, `Int8`, `Uint16`, or `Uint8` column. Schema validation accepts the promotion, but partition extraction passes an `int32` to the bucket transformer, which asserts `int64`. [Arrow value conversion](https://github.com/apache/iceberg-go/blob/74b684cf085355bfddba0d2c74743bacd5d2eae3/table/partitioned_fanout_writer.go#L1266-L1301) · [Bucket transformer](https://github.com/apache/iceberg-go/blob/74b684cf085355bfddba0d2c74743bacd5d2eae3/transforms.go#L664-L679) · [Review on #2658](https://github.com/apache/iceberg-go/pull/2658#pullrequestreview-5986244814) #### What Create a table with `id` of type `long` and partition it by `bucket(16, id)`. Run `table.WriteRecords` with the default writer and a one-row Arrow batch containing `id = -1` as `Int32`. The write should succeed and produce the same bucket as an Arrow `Int64` containing `-1`. #### Implementation In `getArrowValueAsIcebergValue`, widen those five Arrow types to `int64` when the Iceberg source is `long`, following the existing `Uint32` branch. -- 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]
