zeroshade commented on code in PR #1304:
URL: https://github.com/apache/arrow-adbc/pull/1304#discussion_r1397932634
##########
go/adbc/drivermgr/wrapper.go:
##########
@@ -186,6 +190,19 @@ func getRdr(out *C.struct_ArrowArrayStream)
(array.RecordReader, error) {
return rdr.(array.RecordReader), nil
}
+func getSchema(out *C.struct_ArrowSchema) (*arrow.Schema, error) {
+ // Maybe: ImportCArrowSchema should perform this check?
+ if out.format == nil {
+ return nil, nil
+ }
+
+ schema, err :=
cdata.ImportCArrowSchema((*cdata.CArrowSchema)(unsafe.Pointer(out)))
+ if err != nil {
+ return nil, err
+ }
+ return schema, nil
Review Comment:
Why not just `return cdata.ImportCArrowSchema(....)` ?
--
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]