[codex] Prepare sorted q2 global ranks lazily - #3413
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…rank-setup-merge-main-171335
|
Current-main refresh status:
|
|
Closing this stale sorted-path draft in favor of the refreshed current-base draft #3433. The q2 post-prepare diagnostic split has already landed on main, and #3433 now carries the sorted grouped-distinct lazy/local-rank algorithm boundary plus current JSONBench context. Keeping this closed avoids two open drafts for the same sorted-path lane. |
Summary
GlobalCodes.Refs #3324.
Claim Boundary
This is no-aggregate
one_shot_end_to_endtyped-column q2 setup work only. It is not metadata acceleration, not a hot-prepared headline result, and not a TreeDB-vs-ClickHouse claim.Important: current 1M JSONBench production q2 still selects the dense grouped-count-distinct path, not this PR's sorted grouped-distinct lazy/local-rank path. Treat the 1M production cell below as current-head correctness/no-regression evidence and dense-path frontier evidence, not as a sorted-path runtime win.
Validation
Current head:
20e74d45515b6cfc1ed3f03be7d895e3845bc5d0, merged with currentmainafter #3412.Local validation passed:
GOWORK=off go test ./TreeDB/collections -run 'TestTypedColumnQ2|Q2|q2' -count=1GOWORK=off go test ./cmd/unified_bench -count=1git diff --checkEarlier sorted-path validation also passed:
GOWORK=off go test ./TreeDB/collections -run "TestTypedColumnQ2SortedGroupedDistinct(Streaming1950|LocalDictionariesAndEmptyValues1950|Fallback1950|PrefixMismatchFallback1950)$" -count=1GOWORK=off go test ./TreeDB/collections -run "^$" -bench "^BenchmarkTypedColumnQ2SortedGroupedDistinct1950/prepared/sorted_prefix$" -benchtime=1x -count=11103717 ns/op,608 B/op,5 allocs/op; not a long-run performance claim.Current 1M q2 Evidence
Run used this PR plus JSONBench draft PR #40 for the local-rank reporting fields.
Artifacts:
/mnt/fast4tb/gomap-profiles/q2-pr3413-current-head-20260630_171446/jsonbench_q2_1m_full_prepared_noagg/report.json/mnt/fast4tb/gomap-profiles/q2-pr3413-current-head-20260630_171446/jsonbench_q2_1m_full_prepared_noagg/report.md/mnt/fast4tb/gomap-profiles/q2-pr3413-current-head-20260630_171446/jsonbench_q2_1m_full_prepared_noagg/1m_column-store-full-prepared_one_shot_end_to_end_no_aggregate_metadata_json_full_q2/result.json1M q2
one_shot_end_to_end/no_aggregate_metadata:57.607 / 40.626 / 16.865 / 16.938 / 0.043 ms1,000,000 / 954,611 / 954,61113,b63b8e1013c918fcda7c299ef64beb20c4988854cf0671a83803b6951d795860135,830,26815,991,989 / 32,925,2520 / 0; JSON reconstruction: falsePath caveat:
dense_group_count_distinct_used=truesort_layout=time_us,fallback_reason=none15.934 ms, collect refs5.102 ms, build shards10.832 ms, part local rank0.872 ms, refs627,646, global ranks180,100Notes