You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by li...@apache.org on 2023/06/05 19:01:45 UTC
[arrow-adbc] branch main updated: perf(go/adbc/driver/flightsql): filter by schema in getObjectsTables (#726)
This is an automated email from the ASF dual-hosted git repository.
lidavidm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-adbc.git
The following commit(s) were added to refs/heads/main by this push:
new 691c74f9 perf(go/adbc/driver/flightsql): filter by schema in getObjectsTables (#726)
691c74f9 is described below
commit 691c74f9b2a72c87a207f3d9e7b55f9d87a9b279
Author: vipere <vi...@users.noreply.github.com>
AuthorDate: Mon Jun 5 22:01:40 2023 +0300
perf(go/adbc/driver/flightsql): filter by schema in getObjectsTables (#726)
GetObjects uses this function, for example to list the tables in a
specific schema.
The issue is getObjectsTables does not use the requested schema as a
filter when making the API call, and only later the results are filtered
on the client side.
This fix prevents the server from having to process a lot of unnecessary
data in DBs with many schemas.
---
go/adbc/driver/flightsql/flightsql_adbc.go | 1 +
1 file changed, 1 insertion(+)
diff --git a/go/adbc/driver/flightsql/flightsql_adbc.go b/go/adbc/driver/flightsql/flightsql_adbc.go
index 9bbd7d14..c714f553 100644
--- a/go/adbc/driver/flightsql/flightsql_adbc.go
+++ b/go/adbc/driver/flightsql/flightsql_adbc.go
@@ -1110,6 +1110,7 @@ func (c *cnxn) getObjectsTables(ctx context.Context, depth adbc.ObjectDepth, cat
// Pre-populate the map of which schemas are in which catalogs
includeSchema := depth == adbc.ObjectDepthAll || depth == adbc.ObjectDepthColumns
info, err := c.cl.GetTables(ctx, &flightsql.GetTablesOpts{
+ DbSchemaFilterPattern: dbSchema,
TableNameFilterPattern: tableName,
TableTypes: tableType,
IncludeSchema: includeSchema,