Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions bindings/python/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions bindings/python/src/datafusion_table_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use datafusion_ffi::table_provider::FFI_TableProvider;
use iceberg::TableIdent;
use iceberg::io::FileIO;
use iceberg::table::StaticTable;
use iceberg_datafusion::table::IcebergTableProvider;
use iceberg_datafusion::table::IcebergStaticTableProvider;
use pyo3::exceptions::PyRuntimeError;
use pyo3::prelude::*;
use pyo3::types::PyCapsule;
Expand All @@ -32,7 +32,7 @@ use crate::runtime::runtime;

#[pyclass(name = "IcebergDataFusionTable")]
pub struct PyIcebergDataFusionTable {
inner: Arc<IcebergTableProvider>,
inner: Arc<IcebergStaticTableProvider>,
}

#[pymethods]
Expand Down Expand Up @@ -69,7 +69,7 @@ impl PyIcebergDataFusionTable {

let table = static_table.into_table();

IcebergTableProvider::try_new_from_table(table)
IcebergStaticTableProvider::try_new_from_table(table)
.await
.map_err(|e| {
PyRuntimeError::new_err(format!("Failed to create table provider: {e}"))
Expand Down
4 changes: 2 additions & 2 deletions crates/integration_tests/tests/shared_tests/datafusion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use datafusion::error::DataFusionError;
use datafusion::prelude::SessionContext;
use iceberg::{Catalog, CatalogBuilder, TableIdent};
use iceberg_catalog_rest::RestCatalogBuilder;
use iceberg_datafusion::IcebergTableProvider;
use iceberg_datafusion::IcebergStaticTableProvider;
use parquet::arrow::PARQUET_FIELD_ID_META_KEY;

use crate::get_shared_containers;
Expand All @@ -47,7 +47,7 @@ async fn test_basic_queries() -> Result<(), DataFusionError> {
let ctx = SessionContext::new();

let table_provider = Arc::new(
IcebergTableProvider::try_new_from_table(table)
IcebergStaticTableProvider::try_new_from_table(table)
.await
.unwrap(),
);
Expand Down
6 changes: 5 additions & 1 deletion crates/integrations/datafusion/src/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ use iceberg::inspect::MetadataTableType;
use iceberg::{Catalog, NamespaceIdent, Result};

use crate::table::IcebergTableProvider;
use crate::to_datafusion_error;

/// Represents a [`SchemaProvider`] for the Iceberg [`Catalog`], managing
/// access to table providers within a specific namespace.
Expand Down Expand Up @@ -113,7 +114,10 @@ impl SchemaProvider for IcebergSchemaProvider {
let metadata_table_type =
MetadataTableType::try_from(metadata_table_name).map_err(DataFusionError::Plan)?;
if let Some(table) = self.tables.get(table_name) {
let metadata_table = table.metadata_table(metadata_table_type);
let metadata_table = table
.metadata_table(metadata_table_type)
.await
.map_err(to_datafusion_error)?;
return Ok(Some(Arc::new(metadata_table)));
} else {
return Ok(None);
Expand Down
Loading
Loading