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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to