Skip to content

Conversation

bucweat
Copy link
Contributor

@bucweat bucweat commented Oct 13, 2023

System.Data.ODBC GetSchema() includes SYSTEM TABLE when building the query for SqlTables() method. This table doesn't exist in DuckDB and so it breaks the query. This fix adds

table_tp = std::regex_replace(table_tp, std::regex("('SYSTEM TABLE'|SYSTEM TABLE)"), "");

which removes SYSTEM TABLE if it is found in the query.

Along with helpful changes by @maiadegraaf this will solve #6321.

Copy link
Contributor

@maiadegraaf maiadegraaf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. Looks good.

Just one thing: could you run make format-fix so that it passes the format CI?

@github-actions github-actions bot marked this pull request as draft October 13, 2023 12:58
@bucweat bucweat marked this pull request as ready for review October 13, 2023 12:59
@bucweat
Copy link
Contributor Author

bucweat commented Oct 13, 2023

Just one thing: could you run make format-fix so that it passes the format CI?

OK it looks like I managed to please the format CI...

Is there a way to do that in Windows? I guess I could have pulled python commands from makefile. Since I'm on a Mac and I had a venv with most of the prerequisites and make I ran from there...and changed the line endings of all the files...ouch.

@Mytherin
Copy link
Collaborator

Thanks!

@Mytherin Mytherin merged commit 89489e4 into duckdb:main Oct 16, 2023
@bucweat bucweat deleted the System.Data.ODBC_GetSchema_fix branch October 16, 2023 07:27
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.

3 participants