shahar1 commented on code in PR #31249:
URL: https://github.com/apache/airflow/pull/31249#discussion_r1192790058


##########
airflow/providers/google/cloud/operators/bigquery.py:
##########
@@ -2698,16 +2698,17 @@ def execute(self, context: Any):
             self._handle_job_error(job)
 
             return self.job_id
-        self.defer(
-            timeout=self.execution_timeout,
-            trigger=BigQueryInsertJobTrigger(
-                conn_id=self.gcp_conn_id,
-                job_id=self.job_id,
-                project_id=self.project_id,
-                poll_interval=self.poll_interval,
-            ),
-            method_name="execute_complete",
-        )
+        elif self.deferrable and job.running():

Review Comment:
   1. The first part of the `elif` is always `True`, as it is the `else` case  
`if not self.deferrable`
   2. What happens if there's an error in the result? Currently, it will finish 
the `execute()` successfully.



-- 
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]

Reply via email to