Skip to content
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

[CHORE] Add global aggregation docs and error on improper aggregation usage #2025

Merged
merged 4 commits into from
Mar 20, 2024

Conversation

kevinzwang
Copy link
Member

@kevinzwang kevinzwang commented Mar 19, 2024

Added API docs for global expressions.
Also, the builder now checks if there are any aggregation expressions outside of the top level of an agg call, and errors if there are. This effectively disables nested aggs for now

@github-actions github-actions bot added chore documentation Improvements or additions to documentation labels Mar 19, 2024
@kevinzwang kevinzwang marked this pull request as ready for review March 19, 2024 17:43
@kevinzwang kevinzwang self-assigned this Mar 19, 2024
Copy link

codecov bot commented Mar 19, 2024

Codecov Report

Attention: Patch coverage is 70.00000% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 84.69%. Comparing base (d2f28d6) to head (67cc1af).
Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2025      +/-   ##
==========================================
+ Coverage   82.71%   84.69%   +1.98%     
==========================================
  Files          62       62              
  Lines        6623     6771     +148     
==========================================
+ Hits         5478     5735     +257     
+ Misses       1145     1036     -109     
Files Coverage Δ
daft/expressions/expressions.py 91.51% <ø> (ø)
daft/dataframe/dataframe.py 88.92% <70.00%> (+0.10%) ⬆️

... and 8 files with indirect coverage changes

Copy link
Contributor

@colin-ho colin-ho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Just one comment

Args:
*cols (Union[str, Expression]): columns to get an arbitrary value from
Returns:
DataFrame: Globally aggregated max. Should be a single row.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haha good catch

@kevinzwang kevinzwang enabled auto-merge (squash) March 20, 2024 19:21
@kevinzwang kevinzwang merged commit 989d6f9 into main Mar 20, 2024
30 of 31 checks passed
@kevinzwang kevinzwang deleted the kevin/global-aggs branch March 20, 2024 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore documentation Improvements or additions to documentation
2 participants