Skip to content

Commit

Permalink
Cargo format
Browse files Browse the repository at this point in the history
  • Loading branch information
kszucs committed Sep 1, 2021
1 parent af41f59 commit d54858c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
5 changes: 4 additions & 1 deletion datafusion/src/logical_plan/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Item = impl Into<Expr>>) -> Result<Self> {
pub fn project(
&self,
expr: impl IntoIterator<Item = impl Into<Expr>>,
) -> Result<Self> {
let input_schema = self.plan.schema();
let mut projected_expr = vec![];
for e in expr {
Expand Down
5 changes: 4 additions & 1 deletion datafusion/src/logical_plan/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1242,7 +1242,10 @@ pub fn normalize_cols(
exprs: impl IntoIterator<Item = impl Into<Expr>>,
plan: &LogicalPlan,
) -> Result<Vec<Expr>> {
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
Expand Down
4 changes: 2 additions & 2 deletions datafusion/src/pyarrow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<DataFusionError> for PyErr {
fn from(err: DataFusionError) -> PyErr {
Expand Down
2 changes: 1 addition & 1 deletion datafusion/src/sql/planner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d54858c

Please sign in to comment.