villebro commented on a change in pull request #7504: Add try/catch to
cursor.fetchall()
URL:
https://github.com/apache/incubator-superset/pull/7504#discussion_r284084469
##########
File path: superset/models/core.py
##########
@@ -866,7 +866,10 @@ def _log_query(sql):
for sql in sqls[:-1]:
_log_query(sql)
self.db_engine_spec.execute(cursor, sql)
- cursor.fetchall()
+ try:
+ cursor.fetchall()
+ except BaseException:
+ pass
Review comment:
Aah yes, it's explained here: #5517. I think this looks good, but it might
be good to add a comment explaining that some engines require calling
`fetchall()` to force the `execute()` calls to execute synchronously.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]