-
Notifications
You must be signed in to change notification settings - Fork 31
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
fix: Do not show Group column for tree-tables #1851
Conversation
mofojed
commented
Mar 5, 2024
•
edited by dsmmcken
Loading
edited by dsmmcken
- If a table has no grouped columns or only one grouped column, no point in adding an extra Group column for that situation as it is just duplicate information
- Fixes retain previous behaviour for tree-tables, it doesn't make sense as they are parent/child not groups #1831
- Fixes for the case where there is only one group, don't show an extra column #1853
- Added unit tests, and tested with the following snippet:
- If a table has no grouped columns or only one grouped column, no point in adding an extra Group column for that situation as it is just duplicate information - Fixes deephaven#1831 - Added unit tests, and tested with the following snippet: ```python from deephaven import read_csv, agg from deephaven.constants import NULL_INT from deephaven import empty_table _source = empty_table(100).update_view(["ID = i", "Parent = i == 0 ? NULL_INT : (int)(i / 4)"]) _insurance = read_csv("https://media.githubusercontent.com/media/deephaven/examples/main/Insurance/csv/insurance.csv") agg_list = [agg.avg(cols=["bmi", "expenses"])] small_by_list = ["region"] by_list = ["region", "age"] no_group_tree = _source.tree(id_col="ID", parent_col="Parent") no_group_agg = insurance.rollup(aggs=agg_list, by=small_by_list, include_constituents=True) group_rollup_no_agg = insurance.rollup(aggs=[], by=by_list, include_constituents=True) group_rollup_agg = insurance.rollup(aggs=agg_list, by=by_list, include_constituents=True) ```
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1851 +/- ##
==========================================
+ Coverage 46.08% 46.12% +0.04%
==========================================
Files 635 635
Lines 38013 38025 +12
Branches 9608 9612 +4
==========================================
+ Hits 17517 17540 +23
+ Misses 20443 20432 -11
Partials 53 53
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still want Don to check the behavior is as expected
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved for functionality.