Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minor: move field_util from physical-expr crate to expr crate #2250

Merged
merged 1 commit into from
Apr 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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