Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: support getting table properties using schema with db name prefix #848

Conversation

guenp
Copy link
Contributor

@guenp guenp commented Dec 14, 2023

With the introduction of PR #835 a user might want to fully specify a schema with the database name as prefix, i.e. "my db"."my schema".

This PR fixes a bug that currently prevents usage of Dialect.has_table, Dialect.get_table_names, Dialect.get_columns, Dialect.get_foreign_keys and Dialect.get_check_constraints when using said fully specified schema name.

I also refactored test_get_schema_names so there is a separate test for get_table_names.

Edit: This fixes duckdb/duckdb#10033

@guenp
Copy link
Contributor Author

guenp commented Dec 15, 2023

@Mause, this is now ready for review. I added a method _pg_class_filter_scope_schema which filters the query by the specified schema. This only fixes the original bug partially, however - we don't cover the edge case where a schema + table with the same name exists in another database (see note on line 488). I suggest to address this in a subsequent PR.

@guenp
Copy link
Contributor Author

guenp commented Dec 20, 2023

Please review/merge this PR to address this issue: apache/superset#26286 duckdb/duckdb#10033

@Mause Mause merged commit e03f86a into Mause:main Dec 21, 2023
11 checks passed
@Mause Mause mentioned this pull request Dec 21, 2023
@guenp guenp deleted the guen/eco-37-cannot-see-table-schema-when-selecting-db-nameschema-from-ui branch December 22, 2023 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DuckDB does not handle double inverted commas; errors integrating with Superset
2 participants