Revanth14 opened a new pull request, #2568: URL: https://github.com/apache/iceberg-go/pull/2568
## Problem Part of #2062, following #2484 and #2496. Call sites have to stop building `StructType`, `ListType` and `MapType` from field literals and stop reading `FieldList` directly before the fields are unexported for v1.0.0. This PR does that for `table`, `table/internal` and `table/substrait`, which is the last package before the unexport PR. ## Fix The change is generated by the same `go/ast` rewriter as #2484 and #2496. Across 80 files, 359 pointer literals and 6 value literals become `iceberg.NewStructType`, `NewListType` and `NewMapType` calls, and 80 `FieldList` reads become `NumFields()`, `Field(i)` or `Fields()`. Hand edits: `Fields()` returns a copy, so six loops on per-file or per-row paths use `NumFields()` / `Field(i)` instead: `newPartitionRecord`, `collectPartitionStatistics`, the `sortPartitionStatistics` comparator, `lookupPartition`, `inspectCoercePartition` and `appendPartitionAggregate`. Loops that run once per scan, schema or batch keep `Fields()`. Left as they are: the writes through `FieldList` in `TestPhysicalSchemaKeyDistinguishesNestedLayouts` and `TestMetadataSchemaGetterCopiesNestedValues`. Like the ones listed on #2484, they move when the fields are unexported. ## Testing No behavior change. gofmt, `go vet ./...`, `go vet -tags integration ./...` and `go test -race ./...` pass locally. The two tests left alone still catch what they guard: dropping the clone in `schemaByID` fails the getter test, and dropping `Required` or `ElementRequired` from the physical schema key fails the matching subtests. The integration tests were not run locally. Lint was not run locally. -- 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]
