Commit 9892bf1
fix(thoughtspot): a bare group_aggregate keeps its column aggregation
Not every already-aggregating formula makes the surfacing column's
`aggregation` inert, and the converter treated them as if it did.
Established by domain review and confirmed against a live cluster:
sum ( ... ) column aggregation is a NO-OP
group_sum / group_average ( ... ) NO-OP -- these behave like ordinary formulas
sum ( group_aggregate ( ... ) ) NO-OP -- wrapped, so the outer call rules
group_aggregate ( ... ) BARE USED -- like a raw column, ThoughtSpot may
apply the column's aggregation to it
The code grouped all four as "the documented no-op", naming
`group_aggregate ( ... )` in that comment explicitly, and discarded the value
with nothing logged -- deliberately, since warning on the genuinely inert
shapes would train readers to ignore the issue log. So the one shape where the
property is load-bearing lost it silently: a changed answer, not a changed
spelling.
Ossie's metric expression has nowhere to put it, so it is preserved verbatim in
the stash and restored, rather than discarded or folded into the expression --
folding would change what the formula means, since wrapping a bare
`group_aggregate` is exactly what makes the property inert.
Also recorded, because it was nearly acted on as a defect: `sum([SALES])` with
`aggregation: SUM` is genuinely a no-op. A converted model carrying both was
imported into a live cluster and returned numbers identical to its source. An
earlier reading of a `NESTED_AGGREGATE_NOT_SUPPORTED` error as a converter
defect was wrong -- the nesting was in the QUERY, which wrapped an
already-aggregated formula in SUM().
Mutation-checked. 932 tests pass.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 93b43f7 commit 9892bf1
5 files changed
Lines changed: 120 additions & 7 deletions
File tree
- converters/thoughtspot
- docs
- src/ossie_thoughtspot
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| |||
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
102 | 116 | | |
103 | 117 | | |
104 | 118 | | |
| |||
473 | 487 | | |
474 | 488 | | |
475 | 489 | | |
| 490 | + | |
| 491 | + | |
476 | 492 | | |
477 | 493 | | |
478 | 494 | | |
| |||
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| 94 | + | |
94 | 95 | | |
95 | 96 | | |
96 | 97 | | |
| |||
1562 | 1563 | | |
1563 | 1564 | | |
1564 | 1565 | | |
| 1566 | + | |
| 1567 | + | |
| 1568 | + | |
| 1569 | + | |
| 1570 | + | |
| 1571 | + | |
| 1572 | + | |
| 1573 | + | |
| 1574 | + | |
1565 | 1575 | | |
1566 | 1576 | | |
1567 | 1577 | | |
| |||
Lines changed: 41 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| 108 | + | |
108 | 109 | | |
109 | 110 | | |
110 | 111 | | |
| |||
755 | 756 | | |
756 | 757 | | |
757 | 758 | | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
758 | 772 | | |
759 | 773 | | |
760 | 774 | | |
| |||
959 | 973 | | |
960 | 974 | | |
961 | 975 | | |
| 976 | + | |
962 | 977 | | |
963 | 978 | | |
964 | 979 | | |
| |||
1021 | 1036 | | |
1022 | 1037 | | |
1023 | 1038 | | |
1024 | | - | |
1025 | | - | |
1026 | | - | |
1027 | | - | |
1028 | | - | |
1029 | | - | |
1030 | | - | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
1031 | 1063 | | |
1032 | 1064 | | |
1033 | 1065 | | |
| |||
1081 | 1113 | | |
1082 | 1114 | | |
1083 | 1115 | | |
| 1116 | + | |
| 1117 | + | |
1084 | 1118 | | |
1085 | 1119 | | |
1086 | 1120 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
957 | 957 | | |
958 | 958 | | |
959 | 959 | | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
0 commit comments