You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "zeroshade (via GitHub)" <gi...@apache.org> on 2026/09/01 22:44:31 UTC
Re: [I] [Go] Improved building of structs into arrow record [arrow-go]
zeroshade commented on issue #64:
URL: https://github.com/apache/arrow-go/issues/64#issuecomment-5501427472
Resolved by the `arreflect` package (`f63e2c65`), released in v18.6.0: https://pkg.go.dev/github.com/apache/arrow-go/v18/arrow/array/arreflect
The workflow described here — go from a tagged Go struct to an Arrow schema and then populate a record without hand-writing per-field builder calls — is now:
```go
sc, err := arreflect.InferSchema[Test]() // struct -> *arrow.Schema
rec, err := arreflect.RecordFromSlice(objs, memory.DefaultAllocator) // []Test -> arrow.RecordBatch
```
This also removes the `pqschema.NewSchemaFromStruct` + `pqarrow.FromParquet` round-trip from the original example.
Closing, and removing the `good-first-issue` label since the work is done. See also #44, closed for the same reason.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org