Commits


Alex Shcherbakov authored and GitHub committed e0fd7ef8f16
GH-35866: [Go] Provide a copy in `arrow.NestedType.Fields()` implementations (#35867) ### Rationale for this change Data types should be left immutable after they've been constructed. ### What changes are included in this PR? Provide a copy of fields in the following implementations: * `*arrow.StructType.Fields()` * `*arrow.unionType.Fields()` ### Are these changes tested? `arrow.TestFieldsImmutability` was added to ensure the behavior. ### Are there any user-facing changes? Now the fields for structs & unions will be immutable. * Closes: #35866 Authored-by: candiduslynx <candiduslynx@gmail.com> Signed-off-by: Matt Topol <zotthewizard@gmail.com>