Skip to content

Commit 165c56e

Browse files
author
Brent Gardner
committed
delta & ballista tests pass
1 parent 70f7693 commit 165c56e

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

datafusion/core/src/datasource/datasource.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ use crate::error::Result;
2828
use crate::execution::context::SessionState;
2929
use crate::logical_expr::Expr;
3030
use crate::physical_plan::ExecutionPlan;
31+
use crate::prelude::SessionContext;
3132

3233
/// Source table
3334
#[async_trait]
@@ -83,6 +84,10 @@ pub trait TableProviderFactory: Sync + Send {
8384
async fn create(&self, url: &str) -> Result<Arc<dyn TableProvider>>;
8485

8586
/// Create a TableProvider during execution with schema already known from planning
86-
fn with_schema(&self, schema: SchemaRef, url: &str)
87-
-> Result<Arc<dyn TableProvider>>;
87+
fn with_schema(
88+
&self,
89+
ctx: &SessionContext,
90+
schema: SchemaRef,
91+
url: &str,
92+
) -> Result<Arc<dyn TableProvider>>;
8893
}

datafusion/core/src/test_util.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ use crate::datasource::{empty::EmptyTable, provider_as_source, TableProvider};
2626
use crate::execution::context::SessionState;
2727
use crate::logical_expr::{LogicalPlanBuilder, UNNAMED_TABLE};
2828
use crate::physical_plan::ExecutionPlan;
29+
use crate::prelude::SessionContext;
2930
use arrow::datatypes::{DataType, Field, Schema, SchemaRef};
3031
use async_trait::async_trait;
3132
use datafusion_common::DataFusionError;
@@ -339,6 +340,7 @@ impl TableProviderFactory for TestTableFactory {
339340

340341
fn with_schema(
341342
&self,
343+
_ctx: &SessionContext,
342344
_schema: SchemaRef,
343345
url: &str,
344346
) -> datafusion_common::Result<Arc<dyn TableProvider>> {

datafusion/proto/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ mod roundtrip_tests {
183183
.table_factories
184184
.get("testtable")
185185
.expect("Unable to find testtable factory");
186-
let provider = (*factory).with_schema(schema, msg.url.as_str())?;
186+
let provider = (*factory).with_schema(ctx, schema, msg.url.as_str())?;
187187
Ok(provider)
188188
}
189189

0 commit comments

Comments
 (0)