Skip to content

Commit

Permalink
Review Part 33
Browse files Browse the repository at this point in the history
  • Loading branch information
ozankabak committed Feb 14, 2025
1 parent 47dc8f7 commit d5741cd
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion datafusion/expr/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pub mod simplify;
pub mod sort_properties {
pub use datafusion_expr_common::sort_properties::*;
}
pub mod stats_v2 {
pub mod statistics {
pub use datafusion_expr_common::statistics::*;
}
pub mod test;
Expand Down
4 changes: 2 additions & 2 deletions datafusion/physical-expr/src/expressions/binary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ use datafusion_common::{internal_err, Result, ScalarValue};
use datafusion_expr::binary::BinaryTypeCoercer;
use datafusion_expr::interval_arithmetic::{apply_operator, Interval};
use datafusion_expr::sort_properties::ExprProperties;
use datafusion_expr::stats_v2::StatisticsV2::{Bernoulli, Gaussian};
use datafusion_expr::stats_v2::{
use datafusion_expr::statistics::StatisticsV2::{Bernoulli, Gaussian};
use datafusion_expr::statistics::{
combine_bernoullis, combine_gaussians, create_bernoulli_from_comparison,
new_unknown_from_binary_op, StatisticsV2,
};
Expand Down
2 changes: 1 addition & 1 deletion datafusion/physical-expr/src/expressions/negative.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ use arrow::{
use datafusion_common::{internal_err, plan_err, Result};
use datafusion_expr::interval_arithmetic::Interval;
use datafusion_expr::sort_properties::ExprProperties;
use datafusion_expr::stats_v2::StatisticsV2::{
use datafusion_expr::statistics::StatisticsV2::{
self, Bernoulli, Exponential, Gaussian, Uniform, Unknown,
};
use datafusion_expr::{
Expand Down
2 changes: 1 addition & 1 deletion datafusion/physical-expr/src/expressions/not.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ use arrow::datatypes::{DataType, Schema};
use arrow::record_batch::RecordBatch;
use datafusion_common::{cast::as_boolean_array, internal_err, Result, ScalarValue};
use datafusion_expr::interval_arithmetic::Interval;
use datafusion_expr::stats_v2::StatisticsV2::{self, Bernoulli};
use datafusion_expr::statistics::StatisticsV2::{self, Bernoulli};
use datafusion_expr::ColumnarValue;

/// Not expression
Expand Down
4 changes: 2 additions & 2 deletions datafusion/physical-expr/src/statistics/stats_solver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use crate::utils::{build_dag, ExprTreeNode};

use arrow::datatypes::{DataType, Schema};
use datafusion_common::{Result, ScalarValue};
use datafusion_expr::stats_v2::StatisticsV2;
use datafusion_expr::statistics::StatisticsV2;
use datafusion_expr_common::interval_arithmetic::Interval;

use petgraph::adj::DefaultIx;
Expand Down Expand Up @@ -205,7 +205,7 @@ mod tests {

use crate::expressions::{binary, try_cast, Column};
use crate::intervals::cp_solver::PropagationResult;
use crate::utils::stats_v2_graph::ExprStatisticGraph;
use crate::statistics::stats_solver::ExprStatisticGraph;

use arrow_schema::{DataType, Field, Schema};
use datafusion_common::{Result, ScalarValue};
Expand Down
6 changes: 2 additions & 4 deletions datafusion/physical-expr/src/utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
// under the License.

mod guarantee;
pub use guarantee::{Guarantee, LiteralGuarantee};

use std::borrow::Borrow;
use std::sync::Arc;
Expand All @@ -31,15 +32,12 @@ use datafusion_common::tree_node::{
};
use datafusion_common::{HashMap, HashSet, Result};
use datafusion_expr::Operator;
use datafusion_physical_expr_common::sort_expr::LexOrdering;

use datafusion_physical_expr_common::sort_expr::LexOrdering;
use itertools::Itertools;
use petgraph::graph::NodeIndex;
use petgraph::stable_graph::StableGraph;

// Public interface:
pub use guarantee::{Guarantee, LiteralGuarantee};

/// Assume the predicate is in the form of CNF, split the predicate to a Vec of PhysicalExprs.
///
/// For example, split "a1 = a2 AND b1 <= b2 AND c1 != c2" into ["a1 = a2", "b1 <= b2", "c1 != c2"]
Expand Down

0 comments on commit d5741cd

Please sign in to comment.