Python bindings for window functions#819
Merged
jimexist merged 1 commit intoapache:masterfrom Nov 23, 2021
Merged
Conversation
Contributor
Author
|
There is some pending issues:
|
Member
|
cc @jimexist |
jimexist
reviewed
Aug 5, 2021
python/src/dataframe.rs
Outdated
Comment on lines
112
to
115
| // sort by sort_key len descending, so that more deeply sorted plans gets nested further | ||
| // down as children; to further mimic the behavior of PostgreSQL, we want stable sort | ||
| // and a reverse so that tieing sort keys are reversed in order; note that by this rule | ||
| // if there's an empty over, it'll be at the top level |
Member
There was a problem hiding this comment.
i wonder if there can be a way to reuse this part of the code
Member
|
FYI #1167 added some support in DataFrame API |
749e5f7 to
0057285
Compare
0057285 to
f99e9c8
Compare
jgoday
added a commit
to jgoday/arrow-datafusion
that referenced
this pull request
Oct 27, 2021
Contributor
Author
Member
|
hi @jgoday do you mind rebasing first? |
jgoday
added a commit
to jgoday/arrow-datafusion
that referenced
this pull request
Nov 17, 2021
6993939 to
2cf2694
Compare
2cf2694 to
d24b886
Compare
Contributor
Author
|
Hi @jimexist, rebasing done. |
jimexist
reviewed
Nov 22, 2021
Comment on lines
+106
to
+114
| #[pyfunction] | ||
| fn alias(expr: PyExpr, name: &str) -> PyResult<PyExpr> { | ||
| Ok(PyExpr { | ||
| expr: datafusion::logical_plan::Expr::Alias( | ||
| Box::new(expr.expr), | ||
| String::from(name), | ||
| ), | ||
| }) | ||
| } |
Member
There was a problem hiding this comment.
do you think alias should be a method on the expression or column object?
Member
There was a problem hiding this comment.
expression already has an alias method, but perhaps we can support both APIs.
houqp
approved these changes
Nov 22, 2021
unkloud
pushed a commit
to unkloud/datafusion
that referenced
this pull request
Mar 23, 2025
…ache#819) * new benchmark * remove assertion from average agg, add stddev microbenchmark * disable stddev by default * format
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Closes #572.
Rationale for this change
Allows to use window functions from python bindings (inside a select expression).
What changes are included in this PR?
Are there any user-facing changes?
Changes to python crate, new exported functions (sort_by, alias and window).