Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion crates/iceberg/src/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use crate::inspect::MetadataTable;
use crate::io::FileIO;
use crate::io::object_cache::ObjectCache;
use crate::scan::TableScanBuilder;
use crate::spec::{TableMetadata, TableMetadataRef};
use crate::spec::{SchemaRef, TableMetadata, TableMetadataRef};
use crate::{Error, ErrorKind, Result, TableIdent};

/// Builder to create table scan.
Expand Down Expand Up @@ -235,6 +235,11 @@ impl Table {
self.readonly
}

/// Returns the current schema as a shared reference.
pub fn current_schema_ref(&self) -> SchemaRef {
self.metadata.current_schema().clone()
}

/// Create a reader for the table.
pub fn reader_builder(&self) -> ArrowReaderBuilder {
ArrowReaderBuilder::new(self.file_io.clone())
Expand Down
1 change: 1 addition & 0 deletions crates/integrations/datafusion/src/physical_plan/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ pub(crate) mod commit;
pub(crate) mod expr_to_predicate;
pub(crate) mod metadata_scan;
pub(crate) mod project;
pub(crate) mod repartition;
pub(crate) mod scan;
pub(crate) mod write;

Expand Down
3 changes: 3 additions & 0 deletions crates/integrations/datafusion/src/physical_plan/project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ use iceberg::table::Table;

use crate::to_datafusion_error;

/// Column name for the combined partition values struct
pub(crate) const PARTITION_VALUES_COLUMN: &str = "_partition";

/// Extends an ExecutionPlan with partition value calculations for Iceberg tables.
///
/// This function takes an input ExecutionPlan and extends it with an additional column
Expand Down
Loading
Loading