Follow-up from #4444 review (comment by lidavidm).
The Go Flight SQL driver implements SetOption/current-catalog / current-schema by round-tripping through the session options API rather than being a local no-op:
|
// GetCurrentCatalog implements driverbase.CurrentNamespacer. |
|
func (c *connectionImpl) GetCurrentCatalog() (string, error) { |
|
options, err := c.getSessionOptions(context.Background()) |
|
if err != nil { |
|
return "", err |
|
} |
|
if catalog, ok := options["catalog"]; ok { |
|
if val, ok := catalog.(string); ok { |
|
return val, nil |
|
} |
|
return "", c.Base().ErrorHelper.Errorf(adbc.StatusInternal, "server returned non-string catalog %#v", catalog) |
|
} |
|
return "", c.Base().ErrorHelper.Errorf(adbc.StatusNotFound, "current catalog not supported") |
|
} |
The Java driver's FlightSqlConnection should do the same: back adbc.connection.catalog / adbc.connection.db_schema (current catalog / current schema) with the server-side session, matching Go's behavior, instead of leaving them unimplemented/local-only.
Follow-up from #4444 review (comment by lidavidm).
The Go Flight SQL driver implements
SetOption/current-catalog / current-schema by round-tripping through the session options API rather than being a local no-op:arrow-adbc/go/adbc/driver/flightsql/flightsql_connection.go
Lines 149 to 162 in 60e010c
The Java driver's
FlightSqlConnectionshould do the same: backadbc.connection.catalog/adbc.connection.db_schema(current catalog / current schema) with the server-side session, matching Go's behavior, instead of leaving them unimplemented/local-only.