Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(python): wrong batch size #2314

Merged
merged 8 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion python/deltalake/_internal.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ def write_to_deltalake(
data: pyarrow.RecordBatchReader,
partition_by: Optional[List[str]],
mode: str,
max_rows_per_group: int,
schema_mode: Optional[str],
predicate: Optional[str],
name: Optional[str],
Expand Down
1 change: 0 additions & 1 deletion python/deltalake/writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,6 @@ def write_deltalake(
data=data,
partition_by=partition_by,
mode=mode,
max_rows_per_group=max_rows_per_group,
schema_mode=schema_mode,
predicate=predicate,
name=name,
Expand Down
6 changes: 1 addition & 5 deletions python/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1407,7 +1407,6 @@ fn write_to_deltalake(
table_uri: String,
data: PyArrowType<ArrowArrayStreamReader>,
mode: String,
max_rows_per_group: i64,
schema_mode: Option<String>,
partition_by: Option<Vec<String>>,
predicate: Option<String>,
Expand All @@ -1429,10 +1428,7 @@ fn write_to_deltalake(
))
.map_err(PythonError::from)?;

let mut builder = table
.write(batches)
.with_save_mode(save_mode)
.with_write_batch_size(max_rows_per_group as usize);
let mut builder = table.write(batches).with_save_mode(save_mode);
if let Some(schema_mode) = schema_mode {
builder = builder.with_schema_mode(schema_mode.parse().map_err(PythonError::from)?);
}
Expand Down
Loading