You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "lidavidm (via GitHub)" <gi...@apache.org> on 2023/01/24 22:19:40 UTC
[GitHub] [arrow-adbc] lidavidm commented on a diff in pull request #383: feat(go/adbc/driver/flightsql): implement GetObjects
lidavidm commented on code in PR #383:
URL: https://github.com/apache/arrow-adbc/pull/383#discussion_r1086001174
##########
go/adbc/driver/flightsql/flightsql_adbc.go:
##########
@@ -532,10 +536,339 @@ func (c *cnxn) GetInfo(ctx context.Context, infoCodes []adbc.InfoCode) (array.Re
// All non-empty, non-nil strings should be a search pattern (as described
// earlier).
func (c *cnxn) GetObjects(ctx context.Context, depth adbc.ObjectDepth, catalog *string, dbSchema *string, tableName *string, columnName *string, tableType []string) (array.RecordReader, error) {
- return nil, adbc.Error{
- Msg: "Not implemented: GetObjects",
- Code: adbc.StatusNotImplemented,
+ builder := array.NewRecordBuilder(c.db.alloc, adbc.GetObjectsSchema)
+ defer builder.Release()
+
+ // To avoid an N+1 query problem, we assume result sets here will fit in memory and build up a single response.
+ info, err := c.cl.GetCatalogs(ctx)
+ if err != nil {
+ return nil, adbcFromFlightStatus(err)
+ }
+
+ rdr, err := c.readInfo(ctx, schema_ref.Catalogs, info)
Review Comment:
readInfo uses the statement reader, so we don't need to make that assumption
--
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