Skip to content

perf(operators): GroupBy and Batch carry token lists as recipes (ITL-1464) - #568

Closed
eywalker wants to merge 2 commits into
eywalker/itl-1464-tokens-joinsfrom
eywalker/itl-1464-tokens-aggregates
Closed

eywalker wants to merge 2 commits into
eywalker/itl-1464-tokens-joinsfrom
eywalker/itl-1464-tokens-aggregates

Conversation

@eywalker

@eywalker eywalker commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Draft, stacked on #564 (mentions ITL-1464; the issue stays open). The base is #564's branch.

What

GroupBy and Batch carry their lists of source-info tokens as recipes. An aggregation folds its members' system tags, so a list column holds the members' ids itself: large_list<struct<record id, source id, guard>> with dictionary-encoded ids, one array shared by every token column of the table. Text is made by the same materialize, a part at a time. The folds (system tags, data-tag keys) read and digest the members a part at a time; the digested bytes are the same. Design, and what a spill costs: docs/dev/specs/itl-1464-tokens.md, "Aggregations".

Measured

Synthetic time series table, about 2.2 million rows, 13 columns.

Step Peak RSS before after
group_by 20.9 GiB 3.3 GiB
drop_nulls, group_by, map_data above 24 GiB 3.9 GiB
the same, then a function pod above 24 GiB 5.5 GiB

Tests

tests/test_core/streams/test_source_tokens.py: each aggregation against the same operation over text sources (schema, bits, rows, F), at two part sizes: null and NaN keys, member_order, data-tags and plain tags, one-row groups, regrouping, joined and merge-joined inputs, grouped streams joined, rejoined, filtered, batched; no rows; leaks refused; spilled and concatenated tables; the fold against the canonical digest.

The ITL-1347 differential against main on this head: sync equals main byte for byte, async equals main's async as sets (32 of 32); async against sync differs exactly as on main.

🤖 Generated with Claude Code

eywalker and others added 2 commits November 25, 2026 02:07
…1464)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tokens-aggregates

Aggregations read through _input_table too; the design's third step.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 25, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@codecov

codecov Bot commented Nov 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.52941% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/orcapod/utils/source_tokens.py 98.33% 2 Missing ⚠️
src/orcapod/core/streams/base.py 87.50% 1 Missing ⚠️
Files with missing lines Coverage Δ
src/orcapod/core/operators/batch.py 100.00% <100.00%> (+70.19%) ⬆️
src/orcapod/core/operators/filters.py 88.88% <100.00%> (+61.33%) ⬆️
src/orcapod/core/operators/group_by.py 100.00% <100.00%> (+87.30%) ⬆️
src/orcapod/core/operators/rejoin.py 98.91% <ø> (+98.91%) ⬆️
src/orcapod/core/operators/static_output_pod.py 95.48% <100.00%> (+71.83%) ⬆️
src/orcapod/core/streams/arrow_table_stream.py 97.35% <100.00%> (+28.74%) ⬆️
src/orcapod/utils/arrow_utils.py 90.97% <100.00%> (+29.86%) ⬆️
src/orcapod/core/streams/base.py 96.24% <87.50%> (+70.05%) ⬆️
src/orcapod/utils/source_tokens.py 98.50% <98.33%> (+52.81%) ⬆️

... and 210 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@eywalker

eywalker commented Dec 2, 2026

Copy link
Copy Markdown
Contributor Author

Closing as part of the ITL-1464 draft group. The async-route work continues as ITL-1347 stage 5 (ITL-1845). The SpiralDB read work landed in #687 and #679, and continues in #683.

Posted by a Claude Code agent on behalf of @eywalker.

@eywalker eywalker closed this Dec 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant