karenbraganz commented on code in PR #65618:
URL: https://github.com/apache/airflow/pull/65618#discussion_r3501608695


##########
providers/snowflake/src/airflow/providers/snowflake/operators/snowflake.py:
##########
@@ -409,7 +409,7 @@ def __init__(
                 "session_parameters": session_parameters,
                 **hook_params,
             }
-        super().__init__(conn_id=snowflake_conn_id, **kwargs)  # pragma: no 
cover
+        super().__init__(conn_id=snowflake_conn_id, deferrable=deferrable, 
**kwargs)  # pragma: no cover

Review Comment:
   Yes, this is intentional. This was done to fix a failing test.
   
   I have hardcoded `deferrable=False` in SqlExecuteQueryOperator (unless the 
user sets `deferrable=True` in the task) because deferrable mode is only 
compatible with Postgres at the moment. I did not want users with 
default_deferrable=True to unexpectedly have task failures. 
   
   If `deferrable=deferrable` is not passed to the super.__init__() method of 
the SqlExecuteQuery parent class, the `deferrable=False` value in 
SqlExecuteQueryOperator will override the deferrable value set for 
SnowflakeSqlApiOperator even if the user has set `deferrable=True` in the task. 
   
   This class was flagged to me due to a failing test, so I still need to look 
into whether other subclasses are affected silently.



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