Skip to content

Commit

Permalink
Remove unnecessary pub from some constants
Browse files Browse the repository at this point in the history
  • Loading branch information
ozankabak committed Sep 5, 2023
1 parent c0db120 commit 759e686
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 18 deletions.
4 changes: 2 additions & 2 deletions datafusion/common/src/scalar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ use arrow::{
use arrow_array::{ArrowNativeTypeOp, Scalar};

// Constants we use throughout this file:
pub const MILLISECS_IN_ONE_DAY: i64 = 86_400_000;
pub const NANOSECS_IN_ONE_DAY: i64 = 86_400_000_000_000;
const MILLISECS_IN_ONE_DAY: i64 = 86_400_000;
const NANOSECS_IN_ONE_DAY: i64 = 86_400_000_000_000;
const SECS_IN_ONE_MONTH: i64 = 2_592_000; // assuming 30 days.
const MILLISECS_IN_ONE_MONTH: i64 = 2_592_000_000; // assuming 30 days.
const MICROSECS_IN_ONE_MONTH: i64 = 2_592_000_000_000; // assuming 30 days.
Expand Down
20 changes: 10 additions & 10 deletions datafusion/physical-expr/src/intervals/cp_solver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,25 @@ use std::collections::HashSet;
use std::fmt::{Display, Formatter};
use std::sync::Arc;

use super::utils::{
convert_duration_type_to_interval, convert_interval_type_to_duration, get_inverse_op,
};
use super::IntervalBound;
use crate::expressions::Literal;
use crate::intervals::interval_aritmetic::{apply_operator, Interval};
use crate::utils::{build_dag, ExprTreeNode};
use crate::PhysicalExpr;

use arrow_schema::DataType;
use datafusion_common::{DataFusionError, Result, ScalarValue};
use datafusion_expr::type_coercion::binary::get_result_type;
use datafusion_expr::Operator;

use petgraph::graph::NodeIndex;
use petgraph::stable_graph::{DefaultIx, StableGraph};
use petgraph::visit::{Bfs, Dfs, DfsPostOrder, EdgeRef};
use petgraph::Outgoing;

use crate::expressions::Literal;
use crate::intervals::interval_aritmetic::{apply_operator, Interval};
use crate::utils::{build_dag, ExprTreeNode};
use crate::PhysicalExpr;

use super::utils::{
convert_duration_type_to_interval, convert_interval_type_to_duration, get_inverse_op,
};
use super::IntervalBound;

// Interval arithmetic provides a way to perform mathematical operations on
// intervals, which represent a range of possible values rather than a single
// point value. This allows for the propagation of ranges through mathematical
Expand Down
2 changes: 1 addition & 1 deletion datafusion/physical-expr/src/intervals/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
pub mod cp_solver;
pub mod interval_aritmetic;
pub mod rounding;

pub mod test_utils;
pub mod utils;

pub use cp_solver::ExprIntervalGraph;
pub use interval_aritmetic::*;
9 changes: 4 additions & 5 deletions datafusion/physical-expr/src/intervals/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,17 @@

//! Utility functions for the interval arithmetic library

use arrow_schema::DataType;
use datafusion_common::{DataFusionError, Result, ScalarValue};

use datafusion_expr::Operator;
use std::sync::Arc;

use super::{Interval, IntervalBound};
use crate::{
expressions::{BinaryExpr, CastExpr, Column, Literal},
PhysicalExpr,
};

use super::{Interval, IntervalBound};
use arrow_schema::DataType;
use datafusion_common::{DataFusionError, Result, ScalarValue};
use datafusion_expr::Operator;

const MDN_DAY_MASK: i128 = 0xFFFF_FFFF_0000_0000_0000_0000;
const MDN_NS_MASK: i128 = 0xFFFF_FFFF_FFFF_FFFF;
Expand Down

0 comments on commit 759e686

Please sign in to comment.