dgvj-work opened a new pull request, #1480: URL: https://github.com/apache/arrow-go/pull/1480
### Rationale for this change An unsigned Arrow integer used as a Variant `typed_value` was written to Parquet as an unsigned integer logical type. That is not a valid shredded Variant type. The Parquet shredding spec allows only signed integers (`int8`, `int16`, `int32`, `int64`), and apache/arrow#50810 removed the unsigned mappings from the Arrow canonical extension. Case 127 of the shredded-variant interoperability suite expects `INTEGER(32,false)` to be rejected. It was skipped with a comment that said the column is upcast to `int64`. It is not. The column was kept as Arrow `uint32`. Fixes #1202 ### What changes are included in this PR? - `NewVariantType` rejects unsigned `typed_value` fields, including nested shredded fields - Reading a Variant group whose `typed_value` is an unsigned integer fails while building the extension type - Case 127 is no longer skipped ### Are these changes tested? - `go test ./arrow/extensions -count=1 -run 'TestVariant|TestManyTypes'` - `go test ./parquet/pqarrow -count=1 -run 'TestConvertSchema|TestShreddedVariant|TestToParquet|TestVariant'` The shredded-variant file suite still needs `PARQUET_TEST_DATA`. The schema conversion test covers the same rejection case 127 hits, without that data. ### Are there any user-facing changes? Yes. Constructing a Variant extension type with an unsigned `typed_value`, or reading a Parquet Variant shredded as an unsigned integer, now returns `arrow.ErrInvalid`. Made with [Cursor](https://cursor.com) -- 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]
