With snowflake, it's sometimes (particularly with alembic) convenient to connect with schema='information_schema', so that all other schemas are required explicitly (since there's no public schema, and the weird way snowflake scoping works).
As-is without this PR, the duckdb information_schema is lowercased, and the auto-use-schema code in fakesnow would unconditionally .upper() the given schema, search for INFORMATION_SCHEMA, not find it, and then you'd get This session does not have a current schema. Call 'USE SCHEMA' when you wouldn't in real life.
It might perhaps be more ideal to somehow fully recreate the snowflake information_schema and replace it, because there are some differences with the duckdb version that i suspect will end up being irreconcilable, but it's not obvious to me how to do this, nor how much additional work it'd be so...just a thought.
With snowflake, it's sometimes (particularly with alembic) convenient to connect with
schema='information_schema'
, so that all other schemas are required explicitly (since there's no public schema, and the weird way snowflake scoping works).As-is without this PR, the duckdb
information_schema
is lowercased, and the auto-use-schema code in fakesnow would unconditionally.upper()
the given schema, search forINFORMATION_SCHEMA
, not find it, and then you'd getThis session does not have a current schema. Call 'USE SCHEMA'
when you wouldn't in real life.It might perhaps be more ideal to somehow fully recreate the snowflake information_schema and replace it, because there are some differences with the duckdb version that i suspect will end up being irreconcilable, but it's not obvious to me how to do this, nor how much additional work it'd be so...just a thought.