From d54858cc0da8c04b0089e1f80b9fe58e39c313f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Wed, 1 Sep 2021 13:42:44 +0200 Subject: [PATCH] Cargo format --- datafusion/src/logical_plan/builder.rs | 5 ++++- datafusion/src/logical_plan/expr.rs | 5 ++++- datafusion/src/pyarrow.rs | 4 ++-- datafusion/src/sql/planner.rs | 2 +- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/datafusion/src/logical_plan/builder.rs b/datafusion/src/logical_plan/builder.rs index ebe4d2989ff53..b7d837f8e9045 100644 --- a/datafusion/src/logical_plan/builder.rs +++ b/datafusion/src/logical_plan/builder.rs @@ -214,7 +214,10 @@ impl LogicalPlanBuilder { /// This function errors under any of the following conditions: /// * Two or more expressions have the same name /// * An invalid expression is used (e.g. a `sort` expression) - pub fn project(&self, expr: impl IntoIterator>) -> Result { + pub fn project( + &self, + expr: impl IntoIterator>, + ) -> Result { let input_schema = self.plan.schema(); let mut projected_expr = vec![]; for e in expr { diff --git a/datafusion/src/logical_plan/expr.rs b/datafusion/src/logical_plan/expr.rs index f7e4916a94aff..13c30bc54c4f0 100644 --- a/datafusion/src/logical_plan/expr.rs +++ b/datafusion/src/logical_plan/expr.rs @@ -1242,7 +1242,10 @@ pub fn normalize_cols( exprs: impl IntoIterator>, plan: &LogicalPlan, ) -> Result> { - exprs.into_iter().map(|e| normalize_col(e.into(), plan)).collect() + exprs + .into_iter() + .map(|e| normalize_col(e.into(), plan)) + .collect() } /// Recursively 'unnormalize' (remove all qualifiers) from an diff --git a/datafusion/src/pyarrow.rs b/datafusion/src/pyarrow.rs index 163de78a586f0..da05d63d8c2cb 100644 --- a/datafusion/src/pyarrow.rs +++ b/datafusion/src/pyarrow.rs @@ -17,13 +17,13 @@ use pyo3::exceptions::{PyException, PyNotImplementedError}; use pyo3::prelude::*; -use pyo3::PyNativeType; use pyo3::types::PyList; +use pyo3::PyNativeType; use crate::arrow::array::ArrayData; -use crate::scalar::ScalarValue; use crate::arrow::pyarrow::PyArrowConvert; use crate::error::DataFusionError; +use crate::scalar::ScalarValue; impl From for PyErr { fn from(err: DataFusionError) -> PyErr { diff --git a/datafusion/src/sql/planner.rs b/datafusion/src/sql/planner.rs index 2d7766c39a56a..1538b00aa3bcd 100644 --- a/datafusion/src/sql/planner.rs +++ b/datafusion/src/sql/planner.rs @@ -18,10 +18,10 @@ //! SQL Query Planner (produces logical plan from SQL AST) use std::collections::HashSet; +use std::iter; use std::str::FromStr; use std::sync::Arc; use std::{convert::TryInto, vec}; -use std::iter; use crate::catalog::TableReference; use crate::datasource::TableProvider;