lidavidm commented on code in PR #449: URL: https://github.com/apache/arrow-go/pull/449#discussion_r2229823523
########## arrow/array/util.go: ########## @@ -211,14 +211,67 @@ func RecordFromStructArray(in *Struct, schema *arrow.Schema) arrow.Record { // A record batch from JSON is equivalent to reading a struct array in from json and then // converting it to a record batch. func RecordFromJSON(mem memory.Allocator, schema *arrow.Schema, r io.Reader, opts ...FromJSONOption) (arrow.Record, int64, error) { - st := arrow.StructOf(schema.Fields()...) - arr, off, err := FromJSON(mem, st, r, opts...) - if err != nil { - return nil, off, err + var cfg fromJSONCfg Review Comment: Ah, basically we've inlined/specialized `FromJSON` here but with a RecordBuilder? ########## arrow/array/util.go: ########## @@ -211,14 +211,67 @@ func RecordFromStructArray(in *Struct, schema *arrow.Schema) arrow.Record { // A record batch from JSON is equivalent to reading a struct array in from json and then // converting it to a record batch. func RecordFromJSON(mem memory.Allocator, schema *arrow.Schema, r io.Reader, opts ...FromJSONOption) (arrow.Record, int64, error) { - st := arrow.StructOf(schema.Fields()...) - arr, off, err := FromJSON(mem, st, r, opts...) - if err != nil { - return nil, off, err + var cfg fromJSONCfg Review Comment: Can we link to the issue here or/and summarize the performance issue so that it's clear why we're doing something rather unusual? -- 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-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org