-
Notifications
You must be signed in to change notification settings - Fork 175
feat(expr-ir): Finish* implementing ArrowExpr
#3325
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
Draft
dangotbanned
wants to merge
102
commits into
oh-nodes
Choose a base branch
from
expr-ir/plz-finish-arrow-expr
base: oh-nodes
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
+3,062
−301
Conversation
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
Quite odd behavior for scalar lol
Will come back to this later to shrink
Discovered while adding `kurtosis` test which had an empty series
Adding the `skew` test revealed this "edge case"
The rest will allow them to be used in `group_by`
Indirectly adds support for `over` too, but haven't added tests yet
- Still needs tests - Also unsure what the scalar behavior should be for `mode_all`
I wanna try rewriting this without `numpy` after getting the tests in place
Got quite a few more ideas to experiment with
Each of these are expensive + this version is simpler
Managed to write it with one less `if_else`, but the readability suffered so this will do
dangotbanned
commented
Nov 26, 2025
Much clearer what each case is testing, covers a slightly more, + generates nice test ids
Using `repr` was making the tests *look* like they worked, but the reality was hairier
Solved *some* of my woes - but it looks like there may be another issue?
At least the expansion worked!
Was already working, but always good to be sure
- Expecting a failure for `<15.0`, just not sure what it'll be - `unify_dictionaries` may also be new?
- Needed to rethink the typing a bit - Accessor methods can return `Expr` or `Scalar` and may not depend on the input shape - Also, probably found a bug in `polars` - Nice to see things held together over here 😄
Mostly typing, but generally things that made sense in an earlier version
- `fill_nan`, `null_count` are on `main` - the other two are 2/3 of #3028
a mix of things: - added after the dsl was written - or deprecated before - or not support in `pyarrow` - or I missed it oops
Realized after writing this that I didn't test it https://github.com/narwhals-dev/narwhals/pull/3332/files#r2572340215
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.
Related issues
ExprIR #2572Description
Note
TODO: List all the new/reimplemented stuff
This PR is a bit of an amuse-bouche.
I've really tried to focus on getting an implementation for all of the methods in the
Exprnamespace. Man there a lot of them nowStill need to catch up with new stuff on
mainthat wasn't there when I started 😅Planning to tackle that after the
Expraccessor methodsSide Note
I'm fighting the urge pretty hard to rewrite how this version of
CompliantExprworks.Most of what is in (https://github.com/narwhals-dev/narwhals/blob/ce3ec2194e1f67e998c3ea1f989e624aadb05b55/narwhals/_plan/arrow/expr.py) is general visitor logic which would be a slog to repeat in every backend.
It works and I'm finding it easy to reason about, but I 100% plan to put in some more design work.
Just need to endure the pain of doing it the long way for the rest of the
Exprnamespace ops 😭