Skip to content

java/driver/flight-sql: implement current catalog/current schema via session option #4574

Description

@unikdahal

What feature or improvement would you like to see?

Follow-up from PR #4444 review.

Go's Flight SQL driver implements current catalog / current schema via session options:

// 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")
}

Java's FlightSqlConnection should do the same instead of leaving them unimplemented.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions