apache / arrow-adbc

Database connectivity API standard and libraries for Apache Arrow
https://arrow.apache.org/adbc/
Apache License 2.0
360 stars 87 forks source link

snowflake: GetObjects does not respect new database or schema context #2168

Open davidhcoe opened 1 day ago

davidhcoe commented 1 day ago

What happened?

When you call connection.SetOption("adbc.connection.catalog") or connection.SetOption("adbc.connection.db_schema") the context is not carried through to the connection.GetObjects(...) call, which results in the error:

[Snowflake] 090105 (22000): Cannot perform SELECT. This session does not have a current database. Call 'USE DATABASE', or use a qualified name.

For example. this occurs when you don't first set the adbc.snowflake.sql.db parameter or change it in your session.

Stack Trace

No response

How can we reproduce the bug?

No response

Environment/Setup

No response

davidhcoe commented 1 day ago

Proposed fix coming soon.