Commit 7391f45
fix(thoughtspot): unique formula ids, and stop erroring on a valid self-join
Three findings from a review of the previous nine commits. Two are regressions
those commits introduced — the pattern this round was meant to break.
DUPLICATE `formulas[].id`, EMITTED SILENTLY. `formulas[].id` has two sources
sharing one namespace, and neither checked the other: an id PRESERVED from the
source stash, and one MINTED from the display name. Narrowing
`_DisplayNameAllocator`'s fold to what ThoughtSpot actually treats as equal --
correct in itself — removed the only thing that had been masking the minted
case, so "Order Amount" and "Order-Amount" both emitted `formula_order_amount`
with no issue. A hand-authored metric minting an id equal to a preserved one
collided the same way. Either makes every `[formula_X]` reference ambiguous,
and ThoughtSpot parses an ambiguous bracket reference as search tokens rather
than failing — so the import succeeds and the model is wrong. Ids now come
from one allocator across both sources, the surfacing column's `formula_id` is
rewritten in lockstep, and a rename is reported.
AN ORDINARY SELF-JOIN NOW FAILED. The column-conflict check added last commit
compared whole entries, but a Table's `columns[]` mixes field-derived entries
(name / db_column_name / db_column_properties) with verbatim
`unsurfaced_columns` stash entries carrying raw TML keys. A column surfaced
through one alias and unsurfaced through the other compared unequal: ERROR,
non-zero exit, on a document that was fine — and one that converted cleanly
before the fix. Only the keys that decide WHICH warehouse column is read are
compared now, which is what the message always claimed.
THE CLI CASEFOLD FIX HAD NO TEST. `-o out.yaml --issues OUT.YAML` was pinned by
nothing, so the guard could regress silently. Its sibling in
`dump_document_set` was pinned; this one was missed by the commit that went
looking for exactly this.
All three mutation-checked. 923 tests pass.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 8e93e69 commit 7391f45
3 files changed
Lines changed: 187 additions & 1 deletion
File tree
- converters/thoughtspot
- src/ossie_thoughtspot
- tests
Lines changed: 67 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1242 | 1242 | | |
1243 | 1243 | | |
1244 | 1244 | | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
1245 | 1254 | | |
1246 | 1255 | | |
1247 | 1256 | | |
| |||
1921 | 1930 | | |
1922 | 1931 | | |
1923 | 1932 | | |
| 1933 | + | |
| 1934 | + | |
1924 | 1935 | | |
1925 | 1936 | | |
1926 | 1937 | | |
| |||
2020 | 2031 | | |
2021 | 2032 | | |
2022 | 2033 | | |
| 2034 | + | |
2023 | 2035 | | |
2024 | 2036 | | |
2025 | 2037 | | |
2026 | 2038 | | |
2027 | 2039 | | |
2028 | 2040 | | |
2029 | 2041 | | |
| 2042 | + | |
2030 | 2043 | | |
2031 | 2044 | | |
2032 | 2045 | | |
| |||
2211 | 2224 | | |
2212 | 2225 | | |
2213 | 2226 | | |
| 2227 | + | |
| 2228 | + | |
| 2229 | + | |
| 2230 | + | |
| 2231 | + | |
| 2232 | + | |
| 2233 | + | |
| 2234 | + | |
| 2235 | + | |
| 2236 | + | |
| 2237 | + | |
| 2238 | + | |
| 2239 | + | |
| 2240 | + | |
| 2241 | + | |
| 2242 | + | |
| 2243 | + | |
| 2244 | + | |
| 2245 | + | |
| 2246 | + | |
| 2247 | + | |
| 2248 | + | |
| 2249 | + | |
| 2250 | + | |
| 2251 | + | |
| 2252 | + | |
| 2253 | + | |
| 2254 | + | |
| 2255 | + | |
| 2256 | + | |
| 2257 | + | |
| 2258 | + | |
| 2259 | + | |
| 2260 | + | |
| 2261 | + | |
| 2262 | + | |
| 2263 | + | |
| 2264 | + | |
| 2265 | + | |
| 2266 | + | |
| 2267 | + | |
| 2268 | + | |
| 2269 | + | |
| 2270 | + | |
| 2271 | + | |
| 2272 | + | |
| 2273 | + | |
| 2274 | + | |
| 2275 | + | |
2214 | 2276 | | |
2215 | 2277 | | |
2216 | 2278 | | |
| |||
2282 | 2344 | | |
2283 | 2345 | | |
2284 | 2346 | | |
2285 | | - | |
| 2347 | + | |
| 2348 | + | |
| 2349 | + | |
| 2350 | + | |
| 2351 | + | |
2286 | 2352 | | |
2287 | 2353 | | |
2288 | 2354 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
385 | 385 | | |
386 | 386 | | |
387 | 387 | | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
388 | 400 | | |
389 | 401 | | |
390 | 402 | | |
| |||
Lines changed: 108 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1098 | 1098 | | |
1099 | 1099 | | |
1100 | 1100 | | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
0 commit comments