Skip to content

Commit

Permalink
reorder args for Table::new (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
kylebarron authored Jul 11, 2024
1 parent 137ed29 commit 4f6b1ef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyo3-arrow/src/record_batch_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ impl PyRecordBatchReader {
for batch in stream {
batches.push(batch?);
}
Ok(PyTable::new(schema, batches))
Ok(PyTable::new(batches, schema))
}

/// Access the [SchemaRef] of this RecordBatchReader.
Expand Down
4 changes: 2 additions & 2 deletions pyo3-arrow/src/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pub struct PyTable {
}

impl PyTable {
pub fn new(schema: SchemaRef, batches: Vec<RecordBatch>) -> Self {
pub fn new(batches: Vec<RecordBatch>, schema: SchemaRef) -> Self {
Self { schema, batches }
}

Expand Down Expand Up @@ -147,7 +147,7 @@ impl PyTable {
batches.push(batch);
}

Ok(Self::new(schema, batches))
Ok(Self::new(batches, schema))
}

/// Number of columns in this table.
Expand Down

0 comments on commit 4f6b1ef

Please sign in to comment.