Skip to content

Commit

Permalink
fix default value for more_results
Browse files Browse the repository at this point in the history
  • Loading branch information
pacman82 committed Jan 27, 2024
1 parent aa31dbf commit 48e6ac0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
4 changes: 4 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 ---------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
5 changes: 3 additions & 2 deletions python/arrow_odbc/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
"""
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 48e6ac0

Please sign in to comment.