diff --git a/Changelog.md b/Changelog.md index 7bd3c96..667e716 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,9 @@ # Changelog +## 2.1.6 + +- `BatchReader.more_results` now shares the same default value for fetch buffer size as `read_arrow_batches_from_odbc`. + ## 2.1.5 - Updated Rust dependencies. This includes an update to `odbc-api` which activates db2 specific workaround for any platform diff --git a/doc/source/conf.py b/doc/source/conf.py index d7b6b11..3d73dd3 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -22,7 +22,7 @@ author = "Markus Klein" # The full version, including alpha/beta/rc tags -release = "2.1.5" +release = "2.1.6" # -- General configuration --------------------------------------------------- diff --git a/pyproject.toml b/pyproject.toml index a4f1ab8..28f8992 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ name = "arrow-odbc" authors = [{name = "Markus Klein"}] description="Read the data of an ODBC data source as sequence of Apache Arrow record batches." readme = "README.md" -version = "2.1.5" +version = "2.1.6" dependencies = ["cffi", "pyarrow >= 8.0.0"] [project.license] diff --git a/python/arrow_odbc/reader.py b/python/arrow_odbc/reader.py index 4eb1372..3eb146e 100644 --- a/python/arrow_odbc/reader.py +++ b/python/arrow_odbc/reader.py @@ -9,6 +9,7 @@ from .arrow_odbc import ffi, lib # type: ignore from .error import raise_on_error +DEFAULT_FETCH_BUFFER_LIMIT_IN_BYTES = 2**29 def _schema_from_handle(handle) -> Schema: """ @@ -73,7 +74,7 @@ def __next__(self) -> RecordBatch: def more_results( self, batch_size: int = 65535, - max_bytes_per_batch: Optional[int] = 2**21, + max_bytes_per_batch: Optional[int] = DEFAULT_FETCH_BUFFER_LIMIT_IN_BYTES, max_text_size: Optional[int] = None, max_binary_size: Optional[int] = None, falliable_allocations: bool = False, @@ -237,7 +238,7 @@ def read_arrow_batches_from_odbc( user: Optional[str] = None, password: Optional[str] = None, parameters: Optional[List[Optional[str]]] = None, - max_bytes_per_batch: Optional[int] = 2**29, + max_bytes_per_batch: Optional[int] = DEFAULT_FETCH_BUFFER_LIMIT_IN_BYTES, max_text_size: Optional[int] = None, max_binary_size: Optional[int] = None, falliable_allocations: bool = False,