Repository navigation
Commit cb122c7
committed
fix(service-analytics): the ObjectQL strategy groups a column once when two dimensions read it
- objectql-strategy.ts: a module-level pushGroupKey() appends a groupBy key
unless an identical one (same column, or same column at the same
granularity) is already there. The direct path and the cross-object path
both use it, replacing #28692's two FK-only checks. Two dataset dimensions
over one column now share its group, and the existing row mapping keys the
answer by every dimension name. A column raw beside its bucket stays two
keys, so the engine's duplicate-column refusal still answers it.
- analytics-service.ts (review S1): one whereLeafMembers(where) reader for
namedQueryFields, relationshipMembers and previewWhereColumns, in place of
three copies of the guarded collectFilterLeaves read.
- Tests (review S2 and #28744): a filter on a measure key over a plain
column, two dimensions over one column on the direct path, beside a month
bucket and beside a cross-object dimension, and the raw-beside-bucket
refusal, all on real SQLite.
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 7a48bf7 commit cb122c7
4 files changed
Lines changed: 141 additions & 39 deletions
File tree
- .changeset
- packages/services/service-analytics/src
- __tests__
- strategies
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
24 | 29 | | |
25 | 30 | | |
26 | 31 | | |
| |||
248 | 253 | | |
249 | 254 | | |
250 | 255 | | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
251 | 265 | | |
252 | 266 | | |
253 | 267 | | |
| |||
297 | 311 | | |
298 | 312 | | |
299 | 313 | | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
300 | 371 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
452 | 452 | | |
453 | 453 | | |
454 | 454 | | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
455 | 474 | | |
456 | 475 | | |
457 | 476 | | |
| |||
483 | 502 | | |
484 | 503 | | |
485 | 504 | | |
486 | | - | |
487 | | - | |
488 | | - | |
489 | | - | |
490 | | - | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | | - | |
495 | | - | |
| 505 | + | |
496 | 506 | | |
497 | 507 | | |
498 | 508 | | |
| |||
630 | 640 | | |
631 | 641 | | |
632 | 642 | | |
633 | | - | |
634 | | - | |
635 | | - | |
636 | | - | |
637 | | - | |
638 | | - | |
639 | | - | |
640 | | - | |
641 | | - | |
642 | 643 | | |
643 | 644 | | |
644 | 645 | | |
645 | | - | |
| 646 | + | |
646 | 647 | | |
647 | | - | |
| 648 | + | |
648 | 649 | | |
649 | | - | |
| 650 | + | |
650 | 651 | | |
651 | 652 | | |
652 | 653 | | |
| |||
4798 | 4799 | | |
4799 | 4800 | | |
4800 | 4801 | | |
4801 | | - | |
4802 | | - | |
4803 | | - | |
4804 | | - | |
4805 | | - | |
4806 | | - | |
4807 | | - | |
4808 | | - | |
4809 | 4802 | | |
4810 | | - | |
| 4803 | + | |
4811 | 4804 | | |
4812 | 4805 | | |
4813 | 4806 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
223 | 245 | | |
224 | 246 | | |
225 | 247 | | |
| |||
253 | 275 | | |
254 | 276 | | |
255 | 277 | | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
256 | 282 | | |
257 | 283 | | |
258 | 284 | | |
259 | 285 | | |
260 | 286 | | |
261 | | - | |
| 287 | + | |
262 | 288 | | |
263 | 289 | | |
264 | 290 | | |
265 | 291 | | |
266 | 292 | | |
267 | | - | |
| 293 | + | |
268 | 294 | | |
269 | 295 | | |
270 | 296 | | |
| |||
1345 | 1371 | | |
1346 | 1372 | | |
1347 | 1373 | | |
1348 | | - | |
| 1374 | + | |
1349 | 1375 | | |
1350 | 1376 | | |
1351 | 1377 | | |
1352 | 1378 | | |
1353 | | - | |
1354 | | - | |
1355 | | - | |
1356 | | - | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
1357 | 1383 | | |
1358 | 1384 | | |
1359 | 1385 | | |
1360 | 1386 | | |
1361 | 1387 | | |
1362 | | - | |
| 1388 | + | |
1363 | 1389 | | |
1364 | 1390 | | |
1365 | 1391 | | |
| |||
0 commit comments