From 1696831f5df73b5cf15c6d8426c426b0c4086122 Mon Sep 17 00:00:00 2001 From: mullimanko <40831563+mullimanko@users.noreply.github.com> Date: Sun, 21 Sep 2025 17:07:09 +0200 Subject: [PATCH 1/2] Update _utils.py Add autocommit=True to adbc engine --- py-polars/polars/io/database/_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/py-polars/polars/io/database/_utils.py b/py-polars/polars/io/database/_utils.py index b9a54973bc08..d70072d90851 100644 --- a/py-polars/polars/io/database/_utils.py +++ b/py-polars/polars/io/database/_utils.py @@ -141,4 +141,4 @@ def _open_adbc_connection(connection_uri: str) -> Any: if driver_name in ("duckdb", "snowflake", "sqlite"): connection_uri = re.sub(f"^{driver_name}:/{{,3}}", "", connection_uri) - return adbc_driver.connect(connection_uri) + return adbc_driver.connect(connection_uri, autocommit=True) From 252592c72393e78d439e8b91e8441c9ab85734b5 Mon Sep 17 00:00:00 2001 From: mullimanko <40831563+mullimanko@users.noreply.github.com> Date: Sun, 21 Sep 2025 17:10:04 +0200 Subject: [PATCH 2/2] Update frame.py Delete `conn.commit()` becuase `autocommit=True` --- py-polars/polars/dataframe/frame.py | 1 - 1 file changed, 1 deletion(-) diff --git a/py-polars/polars/dataframe/frame.py b/py-polars/polars/dataframe/frame.py index 3a415a560f86..4fde4dc50f78 100644 --- a/py-polars/polars/dataframe/frame.py +++ b/py-polars/polars/dataframe/frame.py @@ -4402,7 +4402,6 @@ def unpack_table_name(name: str) -> tuple[str | None, str | None, str]: mode=mode, **(engine_options or {}), ) - conn.commit() return n_rows elif engine == "sqlalchemy":