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 expr_rewriter.rs to datafusion-expr crate #2552

Merged
merged 2 commits into from
May 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/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

pub(crate) mod builder;
mod expr;
mod expr_rewriter;
mod expr_simplier;
pub mod plan;
mod registry;
Expand All @@ -34,6 +33,7 @@ pub use builder::{
pub use datafusion_common::{DFField, DFSchema, DFSchemaRef, ToDFSchema};
pub use datafusion_expr::{
expr_fn::binary_expr,
expr_rewriter,
expr_visitor::{ExprVisitable, ExpressionVisitor, Recursion},
ExprSchemable, Operator,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,11 @@

//! Expression rewriter

use super::Expr;
use crate::logical_plan::plan::Aggregate;
use crate::logical_plan::DFSchema;
use crate::logical_plan::ExprSchemable;
use crate::logical_plan::LogicalPlan;
use datafusion_common::Column;
use crate::expr::GroupingSet;
use crate::logical_plan::Aggregate;
use crate::{Expr, ExprSchemable, LogicalPlan};
use datafusion_common::Result;
use datafusion_expr::expr::GroupingSet;
use datafusion_common::{Column, DFSchema};
use std::collections::HashMap;
use std::collections::HashSet;
use std::sync::Arc;
Expand Down Expand Up @@ -476,10 +473,9 @@ pub fn unnormalize_cols(exprs: impl IntoIterator<Item = Expr>) -> Vec<Expr> {
#[cfg(test)]
mod test {
use super::*;
use crate::logical_plan::DFField;
use crate::prelude::{col, lit};
use crate::{col, lit};
use arrow::datatypes::DataType;
use datafusion_common::ScalarValue;
use datafusion_common::{DFField, DFSchema, ScalarValue};

#[derive(Default)]
struct RecordingRewriter {
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 @@ -34,6 +34,7 @@ mod columnar_value;
pub mod conditional_expressions;
pub mod expr;
pub mod expr_fn;
pub mod expr_rewriter;
pub mod expr_schema;
pub mod expr_visitor;
pub mod field_util;
Expand Down