-
Notifications
You must be signed in to change notification settings - Fork 181
feat: Allow expressions as group_by keys
#2325
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
Changes from all commits
Commits
Show all changes
124 commits
Select commit
Hold shift + click to select a range
c3389d5
WIP: pandas and (almost) polars
FBruzzesi cbc2275
arrow
FBruzzesi 3c03f42
lazyframes
FBruzzesi 3ba79c0
WIP typing
FBruzzesi 4ce0c15
almost there
FBruzzesi 1b2f38a
better parsing: include multi-output exprs
FBruzzesi 105623e
test multi-output
FBruzzesi 73f85ea
allow lit and agg's
FBruzzesi b940b2c
some more typing and coverage
FBruzzesi c6cf243
deduplicate
FBruzzesi f189b26
fix tests
FBruzzesi 698091d
fix(typing): Narrow `EagerGroupBy._keys` to `list[str]`
dangotbanned 922a02e
fix(typing): Mostly resolve `Polars*`
dangotbanned 6407f52
fix(typing): Narrow from `Series | Expr` to `Expr`
dangotbanned 1868a4d
fix(typing): Un break `extract_native` overloads
dangotbanned 733d9f4
refactor: Generalize `_parse_keys` -> `_evaluate_aliases`
dangotbanned 94e3211
fix(typing): Un-confuse `mypy`
dangotbanned d38e466
revert: Undo more renaming
dangotbanned a38fa41
refactor(typing): Remove implicit `Self`
dangotbanned 1f17e52
refactor: Use `CompliantExpr._evaluate_aliases` more
dangotbanned 08ba27f
test: Skip `over` for `duckdb<1.3`
dangotbanned 25307f4
chore: Remove dead code
dangotbanned 72f5dbb
refactor: Move `with_columns` out of `__init__`
dangotbanned eac99b8
special paths for pandas-like and dask
FBruzzesi 4d5a396
move parsing to group_by
FBruzzesi 0e6a983
Merge remote-tracking branch 'upstream/main' into feat/allow-expr-in-β¦
dangotbanned 660c2ab
revert(typing): Remove `IncompletePolarsExpr`
dangotbanned befcc48
chore(typing): Ignore existing issues
dangotbanned aaf027d
fix(typing): Make everyone compliant again
dangotbanned 8408b01
fix(typing): Use `pyright` ignores
dangotbanned 3f93217
refactor: Move inner function to `_expression_passing`
dangotbanned 890d741
parametrize test
FBruzzesi 8f6632c
no cover
FBruzzesi f075315
fixup tests
FBruzzesi 3bb4968
rm shapeerror for lazyframe, fix duckdb context condition in test
FBruzzesi 9ea5d11
flatten first
FBruzzesi 3473c56
Merge branch 'main' into feat/allow-expr-in-group-by
FBruzzesi 346f492
Merge branch 'main' into feat/allow-expr-in-group-by
FBruzzesi ec449ec
Merge branch 'main' into feat/allow-expr-in-group-by
FBruzzesi 8431cee
Merge branch 'feat/allow-expr-in-group-by' of https://github.com/narwβ¦
FBruzzesi f050486
Merge remote-tracking branch 'upstream/main' into feat/allow-expr-in-β¦
dangotbanned 02c7ac5
solve conflicts
FBruzzesi 74da552
solve conflicts
FBruzzesi bb7bda7
Merge branch 'main' into feat/allow-expr-in-group-by
MarcoGorelli 54a7178
WIP
FBruzzesi 386e38c
just missing ordering
FBruzzesi 3faba54
compliant frames
FBruzzesi 8ab528e
ok make stable v1 work
FBruzzesi 49a77b7
extract_native(arg) -> arg.native
FBruzzesi 7e86ac1
fix polars drop_null_keys case
FBruzzesi f26f6ed
rename parsing method, fix sqlframe
FBruzzesi 326222f
fix eager __iter__
FBruzzesi 78970ef
fix __all__ namespaces, arrow over
FBruzzesi c43512c
add index name in expected output
FBruzzesi fff4f41
xfail polars
FBruzzesi 36fe9e3
missing drop_null_keys condition to xfail
FBruzzesi b5f5888
Merge branch 'main' into feat/allow-expr-in-group-by
FBruzzesi 99987aa
deal with unnamed and key in ops in agg
FBruzzesi 7862d28
Merge branch 'main' into feat/allow-expr-in-group-by
FBruzzesi a452116
old pandas, make mypy happy?
FBruzzesi dad4035
pandas?
FBruzzesi a077261
resolve conflicts
FBruzzesi 9ac7a24
fix duckdb dashed names
FBruzzesi 1b02590
docstrings and raise test
FBruzzesi b6d5190
merge main
FBruzzesi 0393cc7
forgot about main errors for different exprkind's
FBruzzesi 5bf2179
avoid using internal functions
FBruzzesi 0bfaabc
ok unnamed?
FBruzzesi 0c1d427
xfail polars drop_null_keys and multi output exprs
FBruzzesi 925a295
pin down polars xfail
FBruzzesi f6dba0b
polars conditions
FBruzzesi 4dec624
fast_path for keys being all strings
FBruzzesi 7c42fb2
do not use init in protocol
FBruzzesi 5c43b49
Merge branch 'main' into feat/allow-expr-in-group-by
FBruzzesi 99313bf
merge main
FBruzzesi fa77614
Merge branch 'main' into feat/allow-expr-in-group-by
FBruzzesi cfaea70
Merge branch 'main' into feat/allow-expr-in-group-by
FBruzzesi 3754321
type annotate 'keys'
FBruzzesi 69edc84
do not cast
FBruzzesi 2794362
Merge branch 'main' into feat/allow-expr-in-group-by
FBruzzesi e7b4790
Marco's feedback
FBruzzesi 614b69d
merge main
FBruzzesi c5c0bad
merge main
FBruzzesi bb5bae8
WIP: Dan's feedback
FBruzzesi caaa092
fix(typing): Use an invariant `TypeVar` for frame
dangotbanned 797cf74
Dan's feedback, pt2: it does look promising indeed
FBruzzesi 3e968b5
refactor: Reduce protocol footprint
dangotbanned b28da50
fix(typing): Use a constrained `TypeVar`
dangotbanned 8e66073
perf: Avoid converting to `Expr`
dangotbanned 66a24f2
fix: Don't explode on angery `_bool_`
dangotbanned 5d6dd61
try without `tupleify`?
dangotbanned e2184ea
refactor: Simplify `PolarsGroupBy`
dangotbanned c5379d7
remove duplicate line oops
dangotbanned 0df5c3f
Merge branch 'main' into feat/allow-expr-in-group-by
FBruzzesi f079244
refactor: Align both `Polars` impls
dangotbanned 61be623
fix?
FBruzzesi ae38ed7
feedback
FBruzzesi 5f593c8
rollback pandas change
FBruzzesi 5aef757
ok, pragmatism wins?
FBruzzesi eae7f40
pragmatism wins: test fix
FBruzzesi 2a574c0
similar trick for pyarrow
FBruzzesi 169d749
feedback
FBruzzesi 62f5749
GroupBy positional only, parametrize exception test
FBruzzesi a16ec2a
raise for drop_null_keys with expr/series in keys
FBruzzesi bb22b1b
feat(typing): Add overloads for `drop_null_keys` string only
dangotbanned cb4a28e
also ignore `[call-overload]`
dangotbanned db9175f
split test to raise on drop_null_keys True and exprs
FBruzzesi 1533cde
rm ExpansionKind.is_multi_output
FBruzzesi 2b62198
Merge branch 'main' into feat/allow-expr-in-group-by
FBruzzesi a943409
Merge branch 'main' into feat/allow-expr-in-group-by
FBruzzesi b8ac267
perf: Avoid creating `2*len(exprs)` lists in `agg`
dangotbanned b08aabe
revert(typing): Un-add `EagerDataFrameT_co`
dangotbanned e3b5a7e
perf: evaluate exclude outside of loop
dangotbanned 5e77645
revert: Remove duplicate method
dangotbanned 3f22a44
perf: More outside of loop
dangotbanned d8a47ad
Merge remote-tracking branch 'upstream/main' into feat/allow-expr-in-β¦
dangotbanned 7adffd0
chore: Apply suggestions
dangotbanned 5440c4f
Dan's feedback
FBruzzesi a605700
Merge branch 'main' into feat/allow-expr-in-group-by
dangotbanned e839ba6
Merge branch 'main' into feat/allow-expr-in-group-by
dangotbanned 8a9b313
fix when grouping by selector
MarcoGorelli 9565b9e
simplify pyarrow, remove double-drop_nulls
MarcoGorelli 1623a71
restore existing test
MarcoGorelli 4995bc8
remove unnecessary xfail
MarcoGorelli File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.