joellubi commented on code in PR #1304:
URL: https://github.com/apache/arrow-adbc/pull/1304#discussion_r1395536516
##########
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?
Review Comment:
This check is needed for when `catalog` or `dbSchema` is specified for
`GetTableSchema`. The SQLite driver [does not return a
schema](https://github.com/apache/arrow-adbc/blob/main/c/driver/sqlite/sqlite.c#L951-L958)
when either of these are set. As a result, we attempt to import a schema
through the cdata interface with all nil fields including `format` which panics
when it reaches [this
line](https://github.com/apache/arrow/blob/main/go/arrow/cdata/cdata.go#L260).
It does seem like it would be helpful to perform these nil checks in the
`cdata` package, but I just wanted to check first as that would require
cross-repo changes and add to the scope of these changes.
--
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]