Skip to content

Commit

Permalink
datafusion 40 patchset #1
Browse files Browse the repository at this point in the history
  • Loading branch information
rtyler committed Jul 12, 2024
1 parent f432c4f commit d55727b
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 4 deletions.
4 changes: 4 additions & 0 deletions crates/core/src/delta_datafusion/cdf/scan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ impl DisplayAs for DeltaCdfScan {
}

impl ExecutionPlan for DeltaCdfScan {
fn name(&self) -> &str {
Self::static_name()
}

fn as_any(&self) -> &dyn Any {
self
}
Expand Down
2 changes: 1 addition & 1 deletion crates/core/src/delta_datafusion/find_files/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ async fn scan_table_by_files(

// Identify which columns we need to project
let mut used_columns = expression
.to_columns()?
.column_refs()
.into_iter()
.map(|column| logical_schema.index_of(&column.name))
.collect::<std::result::Result<Vec<usize>, ArrowError>>()?;
Expand Down
4 changes: 4 additions & 0 deletions crates/core/src/delta_datafusion/find_files/physical.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ impl DisplayAs for FindFilesExec {
}

impl ExecutionPlan for FindFilesExec {
fn name(&self) -> &str {
Self::static_name()
}

fn as_any(&self) -> &dyn Any {
self
}
Expand Down
11 changes: 8 additions & 3 deletions crates/core/src/delta_datafusion/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,11 @@ use datafusion_common::scalar::ScalarValue;
use datafusion_common::tree_node::{TreeNode, TreeNodeRecursion, TreeNodeVisitor};
use datafusion_common::{
config::ConfigOptions, Column, DFSchema, DataFusionError, Result as DataFusionResult,
ToDFSchema,
TableReference, ToDFSchema,
};
use datafusion_expr::logical_plan::CreateExternalTable;
use datafusion_expr::utils::conjunction;
use datafusion_expr::{col, Expr, Extension, LogicalPlan, TableProviderFilterPushDown, Volatility};
use datafusion_physical_expr::PhysicalExpr;
use datafusion_proto::logical_plan::LogicalExtensionCodec;
use datafusion_proto::physical_plan::PhysicalExtensionCodec;
use datafusion_sql::planner::ParserOptions;
Expand Down Expand Up @@ -846,6 +845,10 @@ impl DisplayAs for DeltaScan {
}

impl ExecutionPlan for DeltaScan {
fn name(&self) -> &str {
Self::static_name()
}

fn as_any(&self) -> &dyn Any {
self
}
Expand Down Expand Up @@ -1317,6 +1320,7 @@ impl LogicalExtensionCodec for DeltaLogicalCodec {
fn try_decode_table_provider(
&self,
buf: &[u8],
_table_ref: &TableReference,
_schema: SchemaRef,
_ctx: &SessionContext,
) -> Result<Arc<dyn TableProvider>, DataFusionError> {
Expand All @@ -1327,6 +1331,7 @@ impl LogicalExtensionCodec for DeltaLogicalCodec {

fn try_encode_table_provider(
&self,
_table_ref: &TableReference,
node: Arc<dyn TableProvider>,
buf: &mut Vec<u8>,
) -> Result<(), DataFusionError> {
Expand Down Expand Up @@ -1507,7 +1512,7 @@ pub(crate) async fn find_files_scan<'a>(

// Identify which columns we need to project
let mut used_columns = expression
.to_columns()?
.column_refs()
.into_iter()
.map(|column| logical_schema.index_of(&column.name))
.collect::<Result<Vec<usize>, ArrowError>>()?;
Expand Down
4 changes: 4 additions & 0 deletions crates/core/src/delta_datafusion/physical.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ impl DisplayAs for MetricObserverExec {
}

impl ExecutionPlan for MetricObserverExec {
fn name(&self) -> &str {
Self::static_name()
}

fn as_any(&self) -> &dyn std::any::Any {
self
}
Expand Down
4 changes: 4 additions & 0 deletions crates/core/src/operations/cdc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,10 @@ impl DisplayAs for CDCObserver {
}

impl ExecutionPlan for CDCObserver {
fn name(&self) -> &str {
Self::static_name()
}

fn as_any(&self) -> &dyn std::any::Any {
self
}
Expand Down
4 changes: 4 additions & 0 deletions crates/core/src/operations/merge/barrier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ impl MergeBarrierExec {
}

impl ExecutionPlan for MergeBarrierExec {
fn name(&self) -> &str {
Self::static_name()
}

fn as_any(&self) -> &dyn std::any::Any {
self
}
Expand Down
1 change: 1 addition & 0 deletions crates/sql/src/planner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ impl<'a, S: ContextProvider> DeltaSqlToRel<'a, S> {
ParserOptions {
parse_float_as_decimal: self.options.parse_float_as_decimal,
enable_ident_normalization: self.options.enable_ident_normalization,
support_varchar_with_length: false,
},
);
planner.statement_to_plan(s)
Expand Down

0 comments on commit d55727b

Please sign in to comment.