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: log DDL SQL in verbose mode #9816

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

NickCrews
Copy link
Contributor

Before (and still), we log the SQL inside Backend.compile().
I think what this means is that we are logging all SELECT statements.
But, any DDL statements like from create_table() were not logged.
Now they are.
Some SQL statements may be logged twice now, in .compile() and in .raw_sql(), but I don't think that's a big problem?

Before (and still), we log the SQL inside Backend.compile().
I *think* what this means is that we are logging all SELECT statements.
But, any DDL statements like from create_table() were not logged.
Now they are.
Some SQL statements may be logged twice now, in .compile() and in .raw_sql(), but I don't think that's a big problem?
@cpcloud
Copy link
Member

cpcloud commented Aug 12, 2024

Logging twice is not great. Production systems tend to already have problems with log spam, and we should not add to that problem.

@NickCrews
Copy link
Contributor Author

OK, that makes sense. If I come up with a way to not duplicate the logs, is this good to merge?

@NickCrews
Copy link
Contributor Author

I have several times run into bugs that are surfaced when I .cache() a table (and therefore .create_table() is called under the hood), and it is currently quite annoying to debug what SQL is actually getting executed. Setting ibis.verbose = True and getting a good first idea would be very pleasant.

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.

2 participants