-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Allow connection with schema=information_schema (#122)
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. --------- Co-authored-by: Oliver Mannion <[email protected]>
- Loading branch information
Showing
2 changed files
with
19 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters