Skip to content

Commit

Permalink
generalize WindowBuffer
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Chien <[email protected]>
  • Loading branch information
stdrc committed Jan 18, 2024
1 parent 3181b68 commit 5840681
Show file tree
Hide file tree
Showing 4 changed files with 245 additions and 152 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/expr/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ chrono = { version = "0.4", default-features = false, features = [
ctor = "0.2"
downcast-rs = "1.2"
easy-ext = "1"
educe = "0.5"
either = "1"
enum-as-inner = "0.6"
futures-async-stream = { workspace = true }
Expand Down
6 changes: 5 additions & 1 deletion src/expr/core/src/window_function/call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,18 @@ impl FrameBounds {
}
}

pub trait FrameBoundsImpl {
fn validate(&self) -> Result<()>;
}

#[derive(Display, Debug, Clone, Eq, PartialEq, Hash)]
#[display("ROWS BETWEEN {start} AND {end}")]
pub struct RowsFrameBounds {
pub start: FrameBound<usize>,
pub end: FrameBound<usize>,
}

impl RowsFrameBounds {
impl FrameBoundsImpl for RowsFrameBounds {
fn validate(&self) -> Result<()> {
FrameBound::validate_bounds(&self.start, &self.end)
}
Expand Down
Loading

0 comments on commit 5840681

Please sign in to comment.