Skip to content

Commit e12bf22

Browse files
committed
cleanup
1 parent d451c7c commit e12bf22

3 files changed

Lines changed: 6 additions & 13 deletions

File tree

datafusion-federation/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ pub trait FederationProvider: Send + Sync + std::fmt::Debug {
6464
//
6565
// Returns [`None`] if either the provider cannot federate any plan
6666
// (e.g. [`crate::analyzer::NopFederationProvider`]), or cannot federate
67-
// this [`LogicalPlan`].
67+
// this specific [`LogicalPlan`].
6868
fn analyzer(&self, plan: &LogicalPlan) -> Option<Arc<Analyzer>>;
6969
}
7070

datafusion-federation/src/sql/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ impl FederationProvider for SQLFederationProvider {
8484
}
8585
}
8686

87-
/// This is actually where we figure out how much of the LP we can federate.
8887
#[derive(Debug)]
8988
struct SQLFederationAnalyzerRule {
9089
planner: Arc<SQLFederationPlanner>,

integration-test/src/main.rs

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ mod validation;
33

44
use anyhow::{anyhow, Result};
55
use bench::{Benchmark, Query};
6-
use datafusion::catalog::TableProvider;
7-
use datafusion_federation::sql::{SQLFederationProvider, SQLTableSource};
8-
use datafusion_federation::FederatedTableProviderAdaptor;
96
use std::path::{Path, PathBuf};
107
use std::sync::Arc;
118

@@ -82,7 +79,7 @@ fn get_duckdb_table_factory(db_name: String) -> Result<DuckDBTableFactory> {
8279
.map_err(|e| anyhow!("Failed to create DuckDB connection pool: {}", e))?,
8380
);
8481

85-
Ok(DuckDBTableFactory::new(duckdb_pool))
82+
Ok(DuckDBTableFactory::new(duckdb_pool)
8683
}
8784

8885
#[tokio::main]
@@ -152,16 +149,13 @@ async fn register_federated_duckdb_tables(
152149
duckdb_table_factory: &DuckDBTableFactory,
153150
) -> Result<()> {
154151
for table_name in table_names {
155-
let tbl: Arc<dyn TableProvider> = Arc::new(
152+
ctx.register_table(
153+
&table_name,
156154
duckdb_table_factory
157-
.table_provider_fed(TableReference::bare(table_name.as_str()))
155+
.table_provider(TableReference::bare(table_name.as_str()))
158156
.await
159157
.map_err(|e| anyhow!("Failed to register duckdb table: {}", e))?,
160-
);
161-
tbl.as_any()
162-
.downcast_ref::<FederatedTableProviderAdaptor>()
163-
.expect("was not 'FederatedTableProviderAdaptor");
164-
ctx.register_table(&table_name, tbl)?;
158+
)?;
165159
}
166160

167161
Ok(())

0 commit comments

Comments
 (0)