Skip to content

Commit

Permalink
remove expr::function::window
Browse files Browse the repository at this point in the history
Signed-off-by: TennyZhuang <[email protected]>
  • Loading branch information
TennyZhuang committed Sep 18, 2023
1 parent a53a0d0 commit dc18a24
Show file tree
Hide file tree
Showing 18 changed files with 19 additions and 52 deletions.
5 changes: 3 additions & 2 deletions src/batch/src/executor/sort_over_window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ use risingwave_common::error::{Result, RwError};
use risingwave_common::row::{OwnedRow, Row, RowExt};
use risingwave_common::util::chunk_coalesce::DataChunkBuilder;
use risingwave_common::util::iter_util::ZipEqFast;
use risingwave_expr::function::window::WindowFuncCall;
use risingwave_expr::window_function::{create_window_state, StateKey, WindowStates};
use risingwave_expr::window_function::{
create_window_state, StateKey, WindowFuncCall, WindowStates,
};
use risingwave_pb::batch_plan::plan_node::NodeBody;

use super::{BoxedDataChunkStream, BoxedExecutor, BoxedExecutorBuilder, Executor, ExecutorBuilder};
Expand Down
17 changes: 0 additions & 17 deletions src/expr/src/function/mod.rs

This file was deleted.

15 changes: 0 additions & 15 deletions src/expr/src/function/window/mod.rs

This file was deleted.

1 change: 0 additions & 1 deletion src/expr/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ extern crate self as risingwave_expr;
pub mod agg;
mod error;
pub mod expr;
pub mod function;
pub mod sig;
pub mod table_function;
pub mod vector_op;
Expand Down
2 changes: 1 addition & 1 deletion src/expr/src/window_function/state/aggregate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use smallvec::SmallVec;
use super::buffer::WindowBuffer;
use super::{StateEvictHint, StateKey, StatePos, WindowState};
use crate::agg::{build_append_only, AggArgs, AggCall, BoxedAggregateFunction};
use crate::function::window::{WindowFuncCall, WindowFuncKind};
use crate::window_function::{WindowFuncCall, WindowFuncKind};
use crate::Result;

pub struct AggregateState {
Expand Down
4 changes: 2 additions & 2 deletions src/expr/src/window_function/state/buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use std::ops::Range;

use either::Either;

use crate::function::window::{Frame, FrameBounds, FrameExclusion};
use crate::window_function::{Frame, FrameBounds, FrameExclusion};

struct Entry<K: Ord, V> {
key: K,
Expand Down Expand Up @@ -238,7 +238,7 @@ mod tests {
use itertools::Itertools;

use super::*;
use crate::function::window::{Frame, FrameBound};
use crate::window_function::{Frame, FrameBound};

#[test]
fn test_rows_frame_unbounded_preceding_to_current_row() {
Expand Down
3 changes: 1 addition & 2 deletions src/expr/src/window_function/state/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ use risingwave_common::types::{Datum, DefaultOrdered};
use risingwave_common::util::memcmp_encoding::MemcmpEncoded;
use smallvec::SmallVec;

use super::WindowFuncCall;
use crate::function::window::WindowFuncKind;
use super::{WindowFuncCall, WindowFuncKind};
use crate::sig::FuncSigDebug;
use crate::{ExprError, Result};

Expand Down
4 changes: 2 additions & 2 deletions src/expr/src/window_function/state/row_number.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use risingwave_common::types::Datum;
use smallvec::SmallVec;

use super::{StateEvictHint, StateKey, StatePos, WindowState};
use crate::function::window::WindowFuncCall;
use crate::window_function::WindowFuncCall;
use crate::Result;

#[derive(EstimateSize)]
Expand Down Expand Up @@ -83,7 +83,7 @@ mod tests {

use super::*;
use crate::agg::AggArgs;
use crate::function::window::{Frame, FrameBound, WindowFuncKind};
use crate::window_function::{Frame, FrameBound, WindowFuncKind};

fn create_state_key(pk: i64) -> StateKey {
StateKey {
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/binder/expr/function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use risingwave_common::session_config::USER_NAME_WILD_CARD;
use risingwave_common::types::{DataType, ScalarImpl, Timestamptz};
use risingwave_common::{GIT_SHA, RW_VERSION};
use risingwave_expr::agg::{agg_kinds, AggKind};
use risingwave_expr::function::window::{
use risingwave_expr::window_function::{
Frame, FrameBound, FrameBounds, FrameExclusion, WindowFuncKind,
};
use risingwave_sqlparser::ast::{
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/expr/window_function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
use itertools::Itertools;
use risingwave_common::error::{ErrorCode, RwError};
use risingwave_common::types::DataType;
use risingwave_expr::function::window::{Frame, WindowFuncKind};
use risingwave_expr::window_function::{Frame, WindowFuncKind};

use super::{AggCall, Expr, ExprImpl, OrderBy, RwResult};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use risingwave_common::catalog::{Field, Schema};
use risingwave_common::types::DataType;
use risingwave_common::util::column_index_mapping::ColIndexMapping;
use risingwave_common::util::sort_util::{ColumnOrder, ColumnOrderDisplay};
use risingwave_expr::function::window::{Frame, WindowFuncKind};
use risingwave_expr::window_function::{Frame, WindowFuncKind};
use risingwave_pb::expr::PbWindowFunction;

use super::{DistillUnit, GenericPlanNode, GenericPlanRef};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use risingwave_common::error::{ErrorCode, Result, RwError};
use risingwave_common::types::{DataType, Datum, ScalarImpl};
use risingwave_common::util::sort_util::{ColumnOrder, OrderType};
use risingwave_expr::agg::AggKind;
use risingwave_expr::function::window::{Frame, FrameBound, WindowFuncKind};
use risingwave_expr::window_function::{Frame, FrameBound, WindowFuncKind};

use super::generic::{GenericPlanRef, OverWindow, PlanWindowFunction, ProjectBuilder};
use super::utils::impl_distill_by_unit;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// limitations under the License.

use itertools::Itertools;
use risingwave_expr::function::window::WindowFuncKind;
use risingwave_expr::window_function::WindowFuncKind;
use risingwave_pb::expr::expr_node::Type;
use risingwave_pb::plan_common::JoinType;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

use fixedbitset::FixedBitSet;
use risingwave_common::types::DataType;
use risingwave_expr::function::window::WindowFuncKind;
use risingwave_expr::window_function::WindowFuncKind;

use super::Rule;
use crate::expr::{collect_input_refs, ExprImpl, ExprType};
Expand Down
2 changes: 1 addition & 1 deletion src/stream/src/from_proto/eowc_over_window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

use std::sync::Arc;

use risingwave_expr::function::window::WindowFuncCall;
use risingwave_expr::window_function::WindowFuncCall;
use risingwave_pb::stream_plan::PbEowcOverWindowNode;
use risingwave_storage::StateStore;

Expand Down
2 changes: 1 addition & 1 deletion src/stream/src/from_proto/over_window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use std::sync::Arc;

use risingwave_common::session_config::OverWindowCachePolicy;
use risingwave_common::util::sort_util::ColumnOrder;
use risingwave_expr::function::window::WindowFuncCall;
use risingwave_expr::window_function::WindowFuncCall;
use risingwave_pb::stream_plan::PbOverWindowNode;
use risingwave_storage::StateStore;

Expand Down
2 changes: 1 addition & 1 deletion src/stream/tests/integration_tests/eowc_over_window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// limitations under the License.

use risingwave_expr::agg::{AggArgs, AggKind};
use risingwave_expr::function::window::{Frame, FrameBound, WindowFuncCall, WindowFuncKind};
use risingwave_expr::window_function::{Frame, FrameBound, WindowFuncCall, WindowFuncKind};
use risingwave_stream::executor::{EowcOverWindowExecutor, EowcOverWindowExecutorArgs};

use crate::prelude::*;
Expand Down
2 changes: 1 addition & 1 deletion src/stream/tests/integration_tests/over_window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

use risingwave_common::session_config::OverWindowCachePolicy;
use risingwave_expr::agg::{AggArgs, AggKind};
use risingwave_expr::function::window::{
use risingwave_expr::window_function::{
Frame, FrameBound, FrameExclusion, WindowFuncCall, WindowFuncKind,
};
use risingwave_stream::executor::monitor::StreamingMetrics;
Expand Down

0 comments on commit dc18a24

Please sign in to comment.