Commit 1ce6aac
authored
fix: Do not show Group column for tree-tables (#1851)
- 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 #1831
- Fixes #1853
- 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)
```1 parent aee4047 commit 1ce6aac
13 files changed
Lines changed: 88 additions & 24 deletions
File tree
- __mocks__
- packages/iris-grid/src
- tests/table-operations.spec.ts-snapshots
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
841 | 841 | | |
842 | 842 | | |
843 | 843 | | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
844 | 854 | | |
845 | 855 | | |
846 | 856 | | |
| |||
1991 | 2001 | | |
1992 | 2002 | | |
1993 | 2003 | | |
1994 | | - | |
1995 | | - | |
| 2004 | + | |
1996 | 2005 | | |
1997 | 2006 | | |
1998 | 2007 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| 101 | + | |
101 | 102 | | |
102 | 103 | | |
103 | 104 | | |
104 | 105 | | |
105 | | - | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
106 | 112 | | |
107 | 113 | | |
108 | 114 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
59 | 79 | | |
60 | 80 | | |
61 | 81 | | |
| |||
0 commit comments