Skip to content

Commit

Permalink
docs: Clarify that ArrowWriter expects the batch's schema to match
Browse files Browse the repository at this point in the history
  • Loading branch information
carols10cents committed Jan 29, 2024
1 parent 03a2f7e commit 7bee17a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion parquet/src/arrow/arrow_writer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,9 @@ impl<W: Write + Send> ArrowWriter<W> {
///
/// If this would cause the current row group to exceed [`WriterProperties::max_row_group_size`]
/// rows, the contents of `batch` will be written to one or more row groups such that all but
/// the final row group in the file contain [`WriterProperties::max_row_group_size`] rows
/// the final row group in the file contain [`WriterProperties::max_row_group_size`] rows.
///
/// This will fail if the `batch`'s schema does not match the writer's schema.
pub fn write(&mut self, batch: &RecordBatch) -> Result<()> {
if batch.num_rows() == 0 {
return Ok(());
Expand Down

0 comments on commit 7bee17a

Please sign in to comment.