From a3dedb1652d3ac703ab9ccb941b93e03eccb2076 Mon Sep 17 00:00:00 2001 From: Alexander Beedie Date: Fri, 3 May 2024 15:23:57 +0400 Subject: [PATCH] fix(python): Do not close connection just because we're not returning Arrow data in batches (#16031) --- py-polars/polars/io/database/_executor.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/py-polars/polars/io/database/_executor.py b/py-polars/polars/io/database/_executor.py index f001f2957165..42e1192e67ad 100644 --- a/py-polars/polars/io/database/_executor.py +++ b/py-polars/polars/io/database/_executor.py @@ -196,8 +196,6 @@ def _from_arrow( if re.match(f"^{driver}$", self.driver_name): if ver := driver_properties["minimum_version"]: self._check_module_version(self.driver_name, ver) - fetch_batches = driver_properties["fetch_batches"] - self.can_close_cursor = fetch_batches is None or not iter_batches frames = ( self._apply_overrides(batch, (schema_overrides or {})) if isinstance(batch, DataFrame)