Skip to content

Commit 45c9fa3

Browse files
committed
fix: correct error handling in batch processing for schema conversion
1 parent 569dc26 commit 45c9fa3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/dataframe.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -733,12 +733,12 @@ impl PyDataFrame {
733733

734734
schema = project_schema(schema, desired_schema)?;
735735

736-
batches = batches
736+
batches = Ok(batches
737737
.into_iter()
738738
.flatten()
739739
.map(|record_batch| record_batch_into_schema(record_batch, &schema))
740740
.collect::<Result<Vec<RecordBatch>, ArrowError>>()
741-
.map_err(PyDataFusionError::from)?;
741+
.map_err(PyDataFusionError::from)?)
742742
}
743743

744744
let batches_wrapped = batches.into_iter().map(Ok);

0 commit comments

Comments
 (0)