Skip to content

Commit

Permalink
move field_util from physical-expr to expr (#2250)
Browse files Browse the repository at this point in the history
  • Loading branch information
andygrove authored Apr 17, 2022
1 parent 441cf09 commit e0334de
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion datafusion/core/src/logical_plan/expr_schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use crate::physical_plan::{
use arrow::compute::can_cast_types;
use arrow::datatypes::DataType;
use datafusion_common::{DFField, DFSchema, DataFusionError, ExprSchema, Result};
use datafusion_physical_expr::field_util::get_indexed_field;
use datafusion_expr::field_util::get_indexed_field;

/// trait to allow expr to typable with respect to a schema
pub trait ExprSchemable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
//! Utility functions for complex field access
use arrow::datatypes::{DataType, Field};
use datafusion_common::ScalarValue;
use datafusion_common::{DataFusionError, Result};
use datafusion_common::{DataFusionError, Result, ScalarValue};

/// Returns the field access indexed by `key` from a [`DataType::List`] or [`DataType::Struct`]
/// # Error
Expand Down
1 change: 1 addition & 0 deletions datafusion/expr/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ mod built_in_function;
mod columnar_value;
pub mod expr;
pub mod expr_fn;
pub mod field_util;
mod function;
mod literal;
mod operator;
Expand Down
6 changes: 4 additions & 2 deletions datafusion/physical-expr/src/expressions/get_indexed_field.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

//! get field of a `ListArray`
use crate::{field_util::get_indexed_field as get_data_type_field, PhysicalExpr};
use crate::PhysicalExpr;
use arrow::array::Array;
use arrow::array::{ListArray, StructArray};
use arrow::compute::concat;
Expand All @@ -28,7 +28,9 @@ use arrow::{
use datafusion_common::DataFusionError;
use datafusion_common::Result;
use datafusion_common::ScalarValue;
use datafusion_expr::ColumnarValue;
use datafusion_expr::{
field_util::get_indexed_field as get_data_type_field, ColumnarValue,
};
use std::convert::TryInto;
use std::fmt::Debug;
use std::{any::Any, sync::Arc};
Expand Down
1 change: 0 additions & 1 deletion datafusion/physical-expr/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ pub mod conditional_expressions;
pub mod crypto_expressions;
pub mod datetime_expressions;
pub mod expressions;
pub mod field_util;
mod functions;
mod hyperloglog;
pub mod math_expressions;
Expand Down

0 comments on commit e0334de

Please sign in to comment.