Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Dandandan committed Oct 21, 2022
1 parent ffc9c36 commit 420a2f4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions datafusion/optimizer/src/inline_table_scan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
use crate::{OptimizerConfig, OptimizerRule};
use datafusion_common::Result;
use datafusion_expr::{
col, logical_plan::LogicalPlan, utils::from_plan, LogicalPlanBuilder, TableScan,
logical_plan::LogicalPlan, utils::from_plan, Expr, LogicalPlanBuilder, TableScan,
};

/// Optimization rule that inlines TableScan that provide a [LogicalPlan]
Expand All @@ -40,7 +40,7 @@ impl InlineTableScan {
fn inline_table_scan(plan: &LogicalPlan) -> Result<LogicalPlan> {
match plan {
// Match only on scans without filter/projection
// As DataFrames / Views won't have those
// As DataFrames / Views don't have those
LogicalPlan::TableScan(TableScan {
source,
table_name,
Expand All @@ -56,7 +56,7 @@ fn inline_table_scan(plan: &LogicalPlan) -> Result<LogicalPlan> {
projected_schema
.fields()
.iter()
.map(|field| col(field.name())),
.map(|field| Expr::Column(field.qualified_column())),
Some(table_name.clone()),
)?;
plan.build()
Expand Down

0 comments on commit 420a2f4

Please sign in to comment.