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: allow setting the JDBC URL for MotherDuck #144

Merged
merged 2 commits into from
Jul 18, 2023
Merged

Conversation

loicmathieu
Copy link
Member

Fixes #143

Copy link
Member

@anna-geller anna-geller 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 fix!

Copy link
Member

@brian-mulier-p brian-mulier-p left a comment

Choose a reason for hiding this comment

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

LGTM, just a little question

Comment on lines +121 to +122
this.databaseFile = runContext.tempFile();
Files.delete(this.databaseFile);
Copy link
Member

Choose a reason for hiding this comment

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

Why do we create a tempFile to delete it right afterwards (I know it was already there before but trying to understand)

Copy link
Member Author

Choose a reason for hiding this comment

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

No idea, I think it's here to be sure that the file didn't exist as DuckDB will create it.

Copy link
Member

Choose a reason for hiding this comment

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

duckdb expect to have an empty file for it's database, so this ugly method is only to have a temporary file path

@loicmathieu loicmathieu merged commit ec36758 into master Jul 18, 2023
@loicmathieu loicmathieu deleted the fix/motherduck branch July 24, 2023 07:32
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.

Add MotherDuck support to the DuckDB plugin
4 participants