You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by xu...@apache.org on 2022/04/17 12:26:53 UTC

[arrow-datafusion] branch master updated: move field_util from physical-expr to expr (#2250)

This is an automated email from the ASF dual-hosted git repository.

xudong963 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion.git


The following commit(s) were added to refs/heads/master by this push:
     new e0334dee8 move field_util from physical-expr to expr (#2250)
e0334dee8 is described below

commit e0334dee8b2ff6a35b48a6356f2ee3cc92b462ba
Author: Andy Grove <ag...@apache.org>
AuthorDate: Sun Apr 17 06:26:45 2022 -0600

    move field_util from physical-expr to expr (#2250)
---
 datafusion/core/src/logical_plan/expr_schema.rs               | 2 +-
 datafusion/{physical-expr => expr}/src/field_util.rs          | 3 +--
 datafusion/expr/src/lib.rs                                    | 1 +
 datafusion/physical-expr/src/expressions/get_indexed_field.rs | 6 ++++--
 datafusion/physical-expr/src/lib.rs                           | 1 -
 5 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/datafusion/core/src/logical_plan/expr_schema.rs b/datafusion/core/src/logical_plan/expr_schema.rs
index 59341adbd..e6801f7b7 100644
--- a/datafusion/core/src/logical_plan/expr_schema.rs
+++ b/datafusion/core/src/logical_plan/expr_schema.rs
@@ -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 {
diff --git a/datafusion/physical-expr/src/field_util.rs b/datafusion/expr/src/field_util.rs
similarity index 96%
rename from datafusion/physical-expr/src/field_util.rs
rename to datafusion/expr/src/field_util.rs
index 2c9411e87..a69171ad6 100644
--- a/datafusion/physical-expr/src/field_util.rs
+++ b/datafusion/expr/src/field_util.rs
@@ -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
diff --git a/datafusion/expr/src/lib.rs b/datafusion/expr/src/lib.rs
index 0a05d1faa..b5709d305 100644
--- a/datafusion/expr/src/lib.rs
+++ b/datafusion/expr/src/lib.rs
@@ -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;
diff --git a/datafusion/physical-expr/src/expressions/get_indexed_field.rs b/datafusion/physical-expr/src/expressions/get_indexed_field.rs
index 26a5cf203..04a7a3cc1 100644
--- a/datafusion/physical-expr/src/expressions/get_indexed_field.rs
+++ b/datafusion/physical-expr/src/expressions/get_indexed_field.rs
@@ -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;
@@ -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};
diff --git a/datafusion/physical-expr/src/lib.rs b/datafusion/physical-expr/src/lib.rs
index f369e35d0..94d003614 100644
--- a/datafusion/physical-expr/src/lib.rs
+++ b/datafusion/physical-expr/src/lib.rs
@@ -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;