Skip to content

Commit

Permalink
move code
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Chien <[email protected]>
  • Loading branch information
stdrc committed Jan 22, 2024
1 parent aeea03d commit 5fba65c
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/expr/core/src/window_function/call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,18 +189,6 @@ impl FrameBoundsImpl for RowsFrameBounds {
}
}

#[derive(Display, Debug, Clone, Eq, PartialEq, Hash, EnumAsInner)]
#[display(style = "TITLE CASE")]
pub enum FrameBound<T> {
UnboundedPreceding,
#[display("{0} PRECEDING")]
Preceding(T),
CurrentRow,
#[display("{0} FOLLOWING")]
Following(T),
UnboundedFollowing,
}

#[derive(Debug, Clone, Eq, PartialEq, Hash)]
pub struct RangeFrameBounds {
pub offset_data_type: DataType,
Expand Down Expand Up @@ -256,6 +244,18 @@ impl FrameBoundsImpl for RangeFrameBounds {
}
}

#[derive(Display, Debug, Clone, Eq, PartialEq, Hash, EnumAsInner)]
#[display(style = "TITLE CASE")]
pub enum FrameBound<T> {
UnboundedPreceding,
#[display("{0} PRECEDING")]
Preceding(T),
CurrentRow,
#[display("{0} FOLLOWING")]
Following(T),
UnboundedFollowing,
}

impl<T> FrameBound<T> {
fn offset_value(&self) -> Option<&T> {
match self {
Expand Down

0 comments on commit 5fba65c

Please sign in to comment.