-
Notifications
You must be signed in to change notification settings - Fork 609
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
BUG: Pandas, CSV, and Parquet backends do not have inclusive preceding window bound #2000
Comments
Implemented `preceding` and `following` window boundaries for PySpark backend. Also, added tests in `ibis/tests/all/test_window.py` that tests bounded windows. (note: filed issue #2000 for incorrect behavior in Pandas, Csv, and Parquet backends) Author: Hyonjee <[email protected]> Closes #2001 from hjoo/window-bounds and squashes the following commits: e4ad7f0 [Hyonjee] add comment explaining why we don't set window bounds for shift operations in pyspark backend e94945c [Hyonjee] reformatted with black c4893f5 [Hyonjee] implement window boundaries for pyspark backend and add tests for bounded windows
Pandas backend behavior is also incorrect for Rather, this is the expected behavior:
So on and so forth. |
@jreback @toryhaavik: let me know if you disagree. I'll be working on a PR with updated tests and the behavior described above. |
This just seems wrong. Why would you expect this? or maybe I am misunderstanding the meaning of preceding. the argument to rolling is the window size. |
That's what's expected in other backends. The argument to pandas rolling is window size. The argument to ibis trailing_window is not size but an inclusive |
ok can u make that clear in comments / also i think a release note should indicate this is an api breaking change |
Updated docs and release notes in PR #2009. Let me know if I used the right convention. Re: window size vs window boundary - I agree it's a bit confusing, but I'd prefer to separate the issue from this one because I think that will need a longer API discussion. If we want to change the Ibis trailing_window API altogether to take a window size (like pandas) rather than |
Yep, will close. |
<!-- Thanks for taking the time to contribute to Ibis! Please ensure that your pull request title matches the conventional commits specification: https://www.conventionalcommits.org/en/v1.0.0/ --> ## Description of changes <!-- Write a description of the changes commensurate with the pull request's scope. Extremely small changes such as fixing typos do not need a description. --> Port https://github.com/claypotai/ibis-flink-example to a quickstart/blog post. ## Issues closed <!-- Please add Resolves #<issue number> (no angle brackets) if this pull request resolves any outstanding issues. For example, if your pull requests resolves issues 1000, 2000 and 3000 write: * Resolves #1000 * Resolves #2000 * Resolves #3000 If your pull request doesn't resolve any issues, you can delete this section entirely, including the `## Issues closed` section header. --> Resolves #7739
…n feedback (#26) <!-- Thanks for taking the time to contribute to Ibis! Please ensure that your pull request title matches the conventional commits specification: https://www.conventionalcommits.org/en/v1.0.0/ --> ## Description of changes <!-- Write a description of the changes commensurate with the pull request's scope. Extremely small changes such as fixing typos do not need a description. --> ## Issues closed <!-- Please add Resolves #<issue number> (no angle brackets) if this pull request resolves any outstanding issues. For example, if your pull requests resolves issues 1000, 2000 and 3000 write: * Resolves ibis-project#1000 * Resolves ibis-project#2000 * Resolves ibis-project#3000 If your pull request doesn't resolve any issues, you can delete this section entirely, including the `## Issues closed` section header. --> --------- Co-authored-by: Chloe He <[email protected]>
<!-- Thanks for taking the time to contribute to Ibis! Please ensure that your pull request title matches the conventional commits specification: https://www.conventionalcommits.org/en/v1.0.0/ --> ## Description of changes Ibis works great within Shiny for Python as well, not just Quarto. Add link to Shiny to the docs. <!-- Write a description of the changes commensurate with the pull request's scope. Extremely small changes such as fixing typos do not need a description. --> ## Issues closed <!-- Please add Resolves #<issue number> (no angle brackets) if this pull request resolves any outstanding issues. For example, if your pull requests resolves issues 1000, 2000 and 3000 write: * Resolves #1000 * Resolves #2000 * Resolves #3000 If your pull request doesn't resolve any issues, you can delete this section entirely, including the `## Issues closed` section header. -->
<!-- Thanks for taking the time to contribute to Ibis! Please ensure that your pull request title matches the conventional commits specification: https://www.conventionalcommits.org/en/v1.0.0/ --> ## Description of changes <!-- Write a description of the changes commensurate with the pull request's scope. Extremely small changes such as fixing typos do not need a description. --> ## Issues closed <!-- Please add Resolves #<issue number> (no angle brackets) if this pull request resolves any outstanding issues. For example, if your pull requests resolves issues 1000, 2000 and 3000 write: * Resolves #1000 * Resolves #2000 * Resolves #3000 If your pull request doesn't resolve any issues, you can delete this section entirely, including the `## Issues closed` section header. -->
According to documentation, ibis window preceding and following bounds are inclusive.
Pandas, CSV, and Parquet backends have exclusive preceding window boundaries.
Example (taken from ibis/all/test_window.py):
The text was updated successfully, but these errors were encountered: