Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
Signed-off-by: Xuanwo <[email protected]>
  • Loading branch information
Xuanwo committed Dec 16, 2024
1 parent 7d7ac44 commit 37bb18a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/query/storages/iceberg/src/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,15 +171,15 @@ impl IcebergTable {
))
})?;

Ok(iceberg::table::Table::builder()
iceberg::table::Table::builder()
.identifier(identifier)
.metadata(metadata)
.metadata_location(metadata_location)
.file_io(file_io)
.build()
.map_err(|err| {
ErrorCode::ReadTableDataError(format!("Rebuild iceberg table failed: {err:?}"))
})?)
})
}

/// create a new table on the table directory
Expand Down
9 changes: 7 additions & 2 deletions src/query/storages/iceberg/src/table_source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,13 @@ impl Processor for IcebergTableSource {
// And we should try to build another stream (in next event loop).
} else if let Some(part) = self.ctx.get_partition() {
let part = IcebergPartInfo::from_part(&part)?;
// TODO: enable row filter?
let reader = self.table.table.reader_builder().build();
let reader = self
.table
.table
.reader_builder()
.with_batch_size(self.ctx.get_settings().get_parquet_max_block_size()? as usize)
.with_row_group_filtering_enabled(true)
.build();
// TODO: don't use stream here.
let stream = reader
.read(Box::pin(stream::iter([Ok(part.to_task())])))
Expand Down

0 comments on commit 37bb18a

Please sign in to comment.