-
Notifications
You must be signed in to change notification settings - Fork 478
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
SNOW-1882588 Allow Empty Sql Text when Dataframe Ast is Presented #2136
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -929,8 +929,8 @@ def execute( | |
|
||
if _do_reset: | ||
self.reset() | ||
command = command.strip(" \t\n\r") if command else None | ||
if not command: | ||
command = command.strip(" \t\n\r") if command else "" | ||
if not command and not _dataframe_ast: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we maybe clarify the logging logic here? If I understand this correctly, basically in the case of _dataframe_ast =True, command will be "". Should we log out the base64 string in debug mode? I.e.,
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good Idea, let me change it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. changed |
||
logger.warning("execute: no query is given to execute") | ||
return None | ||
logger.debug("query: [%s]", self._format_query_for_log(command)) | ||
|
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.
Change
None
to "", otherwise the following log formatters will fail.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.
that makes sense.