-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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_query
to format SQL statement correctly in AthenaOperator
#36962
Conversation
16cbe4c
to
e735238
Compare
e735238
to
69d0dc8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work. It would be great if you can add the test cases for this change.
log_query
to format SQL statement correctly in AthenaOperator
@dirrao I didn't add any test cases because it's just reformatting a string. Could you suggest a test case you'd like to see? I thought of two: one with a single-line query and one with a multi-line query which each assert the expected number of newlines in the log message, but that seems overly complicated for what it is... I think it would be something like "capture all logs, for each captured log message, if it contains 'Running Query with params' then assert it has the expected number of line breaks"... It seems maybe excessive but I can add it if you think it's important. |
I think 1 unit test for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Just some whitespace changes to make the Athena query log messages look more readable in the logs.
Before:

After:

closes: #34189