hy144328 commented on code in PR #41979:
URL: https://github.com/apache/superset/pull/41979#discussion_r3566810688
##########
superset/extensions/metadb.py:
##########
@@ -417,12 +417,12 @@ def get_data(
query = self._build_sql(bounds, order, limit, offset)
with self.engine_context() as engine:
- connection = engine.connect()
- rows = connection.execute(query)
- for i, row in enumerate(rows):
- data = dict(zip(self.columns, row, strict=False))
- data["rowid"] = data[self._rowid] if self._rowid else i
- yield data
+ with engine.connect() as connection:
+ rows = connection.execute(query)
Review Comment:
Nice to have but not a regression to the status quo.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]