This is an automated email from the ASF dual-hosted git repository.

kaxil pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new a9a04a52f5e Clarify which Snowflake connectors need the 
session_parameters copy (#75457)
a9a04a52f5e is described below

commit a9a04a52f5ecb9a3a2ce5e1a778dd6d474d8a4cf
Author: Andrey Karazhev <[email protected]>
AuthorDate: Tue Oct 27 23:18:03 2026 +0300

    Clarify which Snowflake connectors need the session_parameters copy (#75457)
    
    Connector 5 keeps session parameters in a SessionParametersProxy and no 
longer
    writes the server's values into the dict it is given, so the copy only 
matters
    below 5. Saying so lets whoever raises the minimum version to 5 remove it.
---
 .../snowflake/src/airflow/providers/snowflake/hooks/snowflake.py     | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git 
a/providers/snowflake/src/airflow/providers/snowflake/hooks/snowflake.py 
b/providers/snowflake/src/airflow/providers/snowflake/hooks/snowflake.py
index 3931f2cf4a2..3d5434326c0 100644
--- a/providers/snowflake/src/airflow/providers/snowflake/hooks/snowflake.py
+++ b/providers/snowflake/src/airflow/providers/snowflake/hooks/snowflake.py
@@ -489,8 +489,9 @@ class SnowflakeHook(DbApiHook):
         """
         static_config = self._get_static_conn_params
         conn_config: dict[str, Any] = dict(static_config)
-        # The connector merges the server's session parameters, AUTOCOMMIT 
among them, into the dict it is
-        # given; a copy keeps them out of the dicts that 
_has_autocommit_session_parameter() reads.
+        # snowflake-connector-python < 5 merges the server's session 
parameters, AUTOCOMMIT among them, into
+        # the dict it is given, and _has_autocommit_session_parameter() reads 
that dict, hence the copy.
+        # Connector 5 leaves the dict alone, so the copy can go once the 
minimum version is 5.
         if isinstance(conn_config.get("session_parameters"), dict):
             conn_config["session_parameters"] = 
dict(conn_config["session_parameters"])
 

Reply via email to