You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "uranusjr (via GitHub)" <gi...@apache.org> on 2023/08/29 07:56:31 UTC

[GitHub] [airflow] uranusjr commented on a diff in pull request #33857: replace unnecessary dict comprehension by dict() in providers

uranusjr commented on code in PR #33857:
URL: https://github.com/apache/airflow/pull/33857#discussion_r1308372003


##########
airflow/providers/google/cloud/operators/bigquery.py:
##########
@@ -1039,7 +1039,7 @@ def execute(self, context: Context):
             self.log.info("Total extracted rows: %s", len(rows))
 
             if self.as_dict:
-                table_data = [{k: v for k, v in row.items()} for row in rows]
+                table_data = [dict(row.items()) for row in rows]

Review Comment:
   ```suggestion
                   table_data = [dict(row) for row in rows]
   ```
   
   I wonder if this is enough.



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org