diff --git a/src/expr/core/src/window_function/call.rs b/src/expr/core/src/window_function/call.rs index 7822ed07c5a93..a7804be77725c 100644 --- a/src/expr/core/src/window_function/call.rs +++ b/src/expr/core/src/window_function/call.rs @@ -111,6 +111,14 @@ impl Frame { } } +#[derive(Display, Debug, Clone, Eq, PartialEq, Hash)] +#[display("{0}")] +pub enum FrameBounds { + Rows(RowsFrameBounds), + // Groups(GroupsFrameBounds), + // Range(RangeFrameBounds), +} + impl FrameBounds { pub fn validate(&self) -> Result<()> { match self { @@ -135,21 +143,6 @@ impl FrameBounds { } } -impl Display for FrameBounds { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::Rows(bounds) => bounds.fmt(f), - } - } -} - -#[derive(Debug, Clone, Eq, PartialEq, Hash)] -pub enum FrameBounds { - Rows(RowsFrameBounds), - // Groups(GroupsFrameBounds), - // Range(RangeFrameBounds), -} - #[derive(Display, Debug, Clone, Eq, PartialEq, Hash)] #[display("ROWS BETWEEN {start} AND {end}")] pub struct RowsFrameBounds {