Revanth14 opened a new pull request, #2484:
URL: https://github.com/apache/iceberg-go/pull/2484
## Problem
Part of #2062. Before the nested type fields are unexported for v1.0.0, call
sites have to stop building `StructType`, `ListType` and `MapType` from field
literals and stop reading `FieldList` directly. This PR does that for the root
package's external tests (`package iceberg_test`).
## Fix
The change is generated by a `go/ast` rewriter that is kept outside the repo:
- 188 pointer literals become `iceberg.NewStructType`, `NewListType` and
`NewMapType` calls, and 2 value literals become `*iceberg.NewX(...)`.
- 29 `FieldList` reads become `NumFields()`, `Field(i)` or `Fields()`.
- An empty `[]NestedField{}` stays an empty slice, so `"fields": []` doesn't
serialize as null.
One hand edit: in `TestStructTypeFieldAccessors`, the rewriter had turned
`assert.Equal(t, st.FieldList, st.Fields())` into a comparison of `Fields()`
with itself. That line is restored.
## Testing
No behavior change; tests only. gofmt, `go vet ./...` and `go test -race
./...` pass locally. Lint was not run locally.
## Context
Follows #2431
--
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]