Skip to content

Commit d5bbbb6

Browse files
mofojeddgodinez-dh
andauthored
fix: DH-19138: Determine Totals Column Name by Num Aggs Per Column (#2411) (#2413)
https://deephaven.atlassian.net/browse/DH-19138 For totals table columns, we were applying renaming logic based on number of operations in the config, but it should be on number of operations for each given column. E.g., for a config `{X : [SUM, COUNT], Y: [COUNT]}` then your columns will be `[X_SUM, X_COUNT, Y]` but we were expecting `[X_SUM, X_COUNT, Y_COUNT]` Co-authored-by: dgodinez-dh <davidgodinez@deephaven.io>
1 parent 5644dad commit d5bbbb6

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

packages/iris-grid/src/IrisGridTableModelTemplate.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -987,13 +987,13 @@ class IrisGridTableModelTemplate<
987987
const tableColumn = this.columns[column];
988988

989989
// Find the matching totals table column for the operation
990-
// When there are multiple aggregations, the column name will be the original name of the column with the operation appended afterward
991-
// When the the operation is the default operation OR there is only one operation, then the totals column name is just the original column name
990+
// When there are multiple aggregations for the column, the column name will be the original name of the column with the operation appended afterward
991+
// When the the operation is the default operation OR there is only one operation for the column, then the totals column name is just the original column name
992992
const totalsColumn = this.totalsTable?.columns.find(
993993
col =>
994994
col.name === `${tableColumn.name}__${operation}` ||
995995
((operation === defaultOperation ||
996-
this.totals?.operationOrder.length === 1) &&
996+
this.totals?.operationMap[col.name]?.length === 1) &&
997997
col.name === tableColumn.name)
998998
);
999999
if (totalsColumn != null) {

0 commit comments

Comments
 (0)