Skip to content

Commit

Permalink
fix: project_bacth to project_batch (apache#848)
Browse files Browse the repository at this point in the history
  • Loading branch information
feniljain authored Dec 26, 2024
1 parent 21d9568 commit 11bc5b7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions crates/iceberg/src/arrow/record_batch_projector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ impl RecordBatchProjector {
}

/// Do projection with record batch
pub(crate) fn project_bacth(&self, batch: RecordBatch) -> Result<RecordBatch> {
pub(crate) fn project_batch(&self, batch: RecordBatch) -> Result<RecordBatch> {
RecordBatch::try_new(
self.projected_schema.clone(),
self.project_column(batch.columns())?,
Expand Down Expand Up @@ -209,7 +209,7 @@ mod test {
])) as ArrayRef;
let batch = RecordBatch::try_new(schema, vec![int_array, struct_array]).unwrap();

let projected_batch = projector.project_bacth(batch).unwrap();
let projected_batch = projector.project_batch(batch).unwrap();
assert_eq!(projected_batch.num_columns(), 2);
let projected_int_array = projected_batch
.column(0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ pub struct EqualityDeleteFileWriter<B: FileWriterBuilder> {
#[async_trait::async_trait]
impl<B: FileWriterBuilder> IcebergWriter for EqualityDeleteFileWriter<B> {
async fn write(&mut self, batch: RecordBatch) -> Result<()> {
let batch = self.projector.project_bacth(batch)?;
let batch = self.projector.project_batch(batch)?;
if let Some(writer) = self.inner_writer.as_mut() {
writer.write(&batch).await
} else {
Expand Down Expand Up @@ -409,7 +409,7 @@ mod test {
let data_file = res.into_iter().next().unwrap();

// check
let to_write_projected = projector.project_bacth(to_write)?;
let to_write_projected = projector.project_batch(to_write)?;
check_parquet_data_file_with_equality_delete_write(
&file_io,
&data_file,
Expand Down

0 comments on commit 11bc5b7

Please sign in to comment.