Commit 5103d82
committed
fix: deep-clone partial-agg states in mergePartialAggs, in-place merge in AggregateOperator
- mergePartialAggs shallow-copied states with {...s}, but values[] and
distinctSet were shared references — mergeStates mutated the originals
- Added cloneState() helper that deep-copies values/distinctSet
- AggregateOperator now merges in-place (owns accumulated state) instead
of calling mergePartialAggs per batch, avoiding O(n) Set clone per iteration
- TopKOperator: extract column arrays outside inner loop (Map.get → direct access)1 parent bed49cc commit 5103d82
2 files changed
+36
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| |||
1533 | 1534 | | |
1534 | 1535 | | |
1535 | 1536 | | |
1536 | | - | |
| 1537 | + | |
| 1538 | + | |
| 1539 | + | |
| 1540 | + | |
| 1541 | + | |
| 1542 | + | |
| 1543 | + | |
| 1544 | + | |
| 1545 | + | |
| 1546 | + | |
| 1547 | + | |
1537 | 1548 | | |
1538 | 1549 | | |
1539 | 1550 | | |
| |||
1545 | 1556 | | |
1546 | 1557 | | |
1547 | 1558 | | |
1548 | | - | |
| 1559 | + | |
| 1560 | + | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
| 1566 | + | |
| 1567 | + | |
| 1568 | + | |
1549 | 1569 | | |
1550 | 1570 | | |
1551 | 1571 | | |
| |||
1633 | 1653 | | |
1634 | 1654 | | |
1635 | 1655 | | |
1636 | | - | |
| 1656 | + | |
1637 | 1657 | | |
1638 | 1658 | | |
1639 | 1659 | | |
| |||
1644 | 1664 | | |
1645 | 1665 | | |
1646 | 1666 | | |
1647 | | - | |
1648 | | - | |
| 1667 | + | |
| 1668 | + | |
1649 | 1669 | | |
1650 | 1670 | | |
1651 | 1671 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
| 197 | + | |
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
| |||
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
233 | 241 | | |
234 | 242 | | |
235 | 243 | | |
236 | 244 | | |
237 | 245 | | |
238 | 246 | | |
239 | | - | |
| 247 | + | |
240 | 248 | | |
241 | 249 | | |
242 | 250 | | |
| |||
249 | 257 | | |
250 | 258 | | |
251 | 259 | | |
252 | | - | |
| 260 | + | |
253 | 261 | | |
254 | 262 | | |
255 | 263 | | |
| |||
0 commit comments