hcrosse opened a new pull request, #723: URL: https://github.com/apache/arrow-go/pull/723
### Rationale The Parquet spec says the root of the schema doesn't have a `repetition_type`. arrow-go writes `REPEATED` for the root `SchemaElement` in the Thrift footer, which breaks interop with consumers like Snowflake. #722 has the full writeup and cross-implementation comparison. ### What changes are included in this PR? `ToThrift()` now nils out `RepetitionType` on the root element before returning, stripping it from the serialized output. This matches how parquet-java and arrow-rs handle the root. The in-memory representation and `WithRootRepetition` API are unaffected. `FromParquet` already tolerates a nil root repetition type ([schema.go#L78-L79](https://github.com/apache/arrow-go/blob/main/parquet/schema/schema.go#L78-L79)), so this is backwards-compatible for both readers and writers. ### Are these changes tested? Updated the existing `TestNestedExample` and added `TestToThriftRootRepetitionStripped` which checks that the root's `repetition_type` is stripped for all three repetition variants and that non-root elements keep theirs. Closes #722 -- 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]
