-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: expose PyWindowFrame #509
Conversation
Build is failing due to new clippy rule in latest Rust. I have a fix in #511 |
@dlovell Could you upmerge to pick up the clippy fix? |
@andygrove i hadn't heard the term upmerge before, but i presume that means merge |
Yes, exactly. |
src/window_frame.rs
Outdated
"groups" => Some(WindowFrameUnits::Groups), | ||
_ => None, | ||
}; | ||
let units = units.unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we return an Err
instead of causing a panic! here?
src/window_frame.rs
Outdated
None => match units { | ||
WindowFrameUnits::Range => WindowFrameBound::Preceding(ScalarValue::UInt64(None)), | ||
WindowFrameUnits::Rows => WindowFrameBound::Preceding(ScalarValue::UInt64(None)), | ||
WindowFrameUnits::Groups => todo!(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment for these todo!
calls .. better to return an Err
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks @dlovell
Which issue does this PR close?
Partial progress on #191 : Expressions: Window function
What changes are included in this PR?
This PR
PyWindowFrame
functions.window
to accept an optionalPyWindowFrame
and optionalPySessionContext
PySessionContext
is necessary to look up aggregates registered viaPySessionContext.register_udaf
function.window
to fall back toSessionContext.udaf
whenfind_df_window_func
failsAccumulator
impl forRustAccumulator
to exposeretract_batch
andsupports_retract_batch
Are there any user-facing changes?
PyWindowFrame
needs to be documented as do changes tofunctions.window
note: I have working code that enables window functions for
ibis
that I still need to create a PR for