Skip to content

Commit

Permalink
fix(python): wrong batch size (#2314)
Browse files Browse the repository at this point in the history
# Description
Was passing the wrong param

- closes #2309
  • Loading branch information
ion-elgreco authored Mar 26, 2024
1 parent abafd2d commit 5b404e2
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
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

0 comments on commit 5b404e2

Please sign in to comment.