-
Notifications
You must be signed in to change notification settings - Fork 176
refactor(expr-ir): Make arrow.functions a package
#3384
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
Merged
Merged
+3,461
−2,167
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
Will gradually split things into modules, then import those modules as aliases
What a cute lil module we have there
This is such a badly named method! `polars` doesn't have an equivalent AFAIK
dangotbanned
commented
Jan 2, 2026
dangotbanned
commented
Jan 2, 2026
dangotbanned
commented
Jan 2, 2026
dangotbanned
commented
Jan 2, 2026
dangotbanned
commented
Jan 2, 2026
- Was avoiding using `dtypes` before as *at some point* the `dtypes` module was imported into `functions`. - No longer an issue here though - Found a couple more uses for `dtype_native` too
That was a lot more involved than I'd hoped for! Kinda forced my hand on addressing some circular imports from #3384 (comment)
for more information, see https://pre-commit.ci
dangotbanned
added a commit
that referenced
this pull request
Jan 3, 2026
In #3384, I started tweaking the impl but realized I had only covered it indirectly Merging ahead of that so I can be sure I don't break it
- Not planning to do this *everywhere* - in `_vector` I want everything except `hist` - They're all good for composing other functions - So if we can skip re-wrapping as a `ChunkedArray`, then I think we should
Quite a lot of inconsistency, but inheriting from polars so idk
Will stick with the name for now Makes a bit more sense without `drop_nulls` - and that didn't need to exist in the first place
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
documentation
Improvements or additions to documentation
internal
pyarrow
Issue is related to pyarrow backend
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.
Description
The size (2K+ LOC!) of (https://github.com/narwhals-dev/narwhals/blob/8d6101cdc56fd9d7d89e8a4665afbfdee8b6e9ec/narwhals/_plan/arrow/functions.py) really got out of hand and was long-overdue a cleanup.
The bad
builtinsgets more complicated the larger a module isThe (new) good
__all__any,all,min,max,str,list) is a non-issuelistandstrfunctions can freely use the same namesRelated issues
ExprIR #2572