Skip to content

Commit 8ebba4d

Browse files
committed
formatting
1 parent edccff9 commit 8ebba4d

2 files changed

Lines changed: 15 additions & 11 deletions

File tree

datafusion-federation/src/analyzer/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ use datafusion::{
1111
config::ConfigOptions,
1212
datasource::source_as_provider,
1313
error::Result,
14-
logical_expr::{Distinct, Expr, Extension, LogicalPlan, Projection, Sort, TableScan, TableSource},
14+
logical_expr::{
15+
Distinct, Expr, Extension, LogicalPlan, Projection, Sort, TableScan, TableSource,
16+
},
1517
optimizer::analyzer::AnalyzerRule,
1618
sql::TableReference,
1719
};

datafusion-federation/src/sql/mod.rs

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@ use datafusion::{
1818
config::ConfigOptions,
1919
error::{DataFusionError, Result},
2020
execution::{context::SessionState, TaskContext},
21-
logical_expr::{Distinct, DistinctOn, Expr, Extension, Limit, LogicalPlan, Projection, Sort, SubqueryAlias},
21+
logical_expr::{
22+
Distinct, DistinctOn, Expr, Extension, Limit, LogicalPlan, Projection, Sort, SubqueryAlias,
23+
},
2224
optimizer::{optimize_unions::OptimizeUnions, Analyzer, AnalyzerRule, Optimizer},
23-
physical_expr::{EquivalenceProperties, LexOrdering, create_physical_sort_expr},
25+
physical_expr::{create_physical_sort_expr, EquivalenceProperties, LexOrdering},
2426
physical_plan::{
2527
execution_plan::{Boundedness, EmissionType},
2628
filter_pushdown::{
@@ -194,8 +196,8 @@ impl FederationPlanner for SQLFederationPlanner {
194196
{
195197
Ok(physical_sort_exprs) if !physical_sort_exprs.is_empty() => {
196198
if let Some(lex_ordering) = LexOrdering::new(physical_sort_exprs) {
197-
let sort_exec = SortExec::new(lex_ordering, schema_cast_exec)
198-
.with_fetch(sort.fetch);
199+
let sort_exec =
200+
SortExec::new(lex_ordering, schema_cast_exec).with_fetch(sort.fetch);
199201
return Ok(Arc::new(sort_exec));
200202
}
201203
}
@@ -1213,7 +1215,7 @@ mod tests {
12131215
fn find_top_sort_walks_projections() -> Result<(), DataFusionError> {
12141216
use datafusion::common::DFSchema;
12151217
use datafusion::logical_expr::{
1216-
Limit, LogicalPlan, Projection, Sort, SubqueryAlias, SortExpr,
1218+
Limit, LogicalPlan, Projection, Sort, SortExpr, SubqueryAlias,
12171219
};
12181220
use datafusion::prelude::col;
12191221
use std::sync::Arc;
@@ -1381,10 +1383,7 @@ mod tests {
13811383
let ctx = SessionContext::new_with_state(state);
13821384
ctx.register_table(table_ref.clone(), table).unwrap();
13831385

1384-
let plan = ctx
1385-
.sql("SELECT a, b FROM t")
1386-
.await?
1387-
.into_optimized_plan()?;
1386+
let plan = ctx.sql("SELECT a, b FROM t").await?.into_optimized_plan()?;
13881387

13891388
let physical_plan = ctx.state().create_physical_plan(&plan).await?;
13901389

@@ -1443,7 +1442,10 @@ mod tests {
14431442
let mut final_queries: Vec<String> = Vec::new();
14441443
physical_plan.apply(|node| {
14451444
if node.name() == "sql_federation_exec" {
1446-
let vep = node.as_any().downcast_ref::<VirtualExecutionPlan>().unwrap();
1445+
let vep = node
1446+
.as_any()
1447+
.downcast_ref::<VirtualExecutionPlan>()
1448+
.unwrap();
14471449
final_queries.push(vep.final_sql()?);
14481450
}
14491451
Ok(TreeNodeRecursion::Continue)

0 commit comments

Comments
 (0)