feat(parquet): RFC 0005 §3.6 — bloom filters on trace_id and span_id - #489
Conversation
📝 WalkthroughWalkthroughParquet writer properties now enable bloom filters for ChangesTrace-context bloom filters
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
There was a problem hiding this comment.
Pull request overview
Adds Parquet bloom filters for the trace-context identifier columns to enable row-group pruning for exact trace/span lookups (per RFC 0005 §3.6), matching the existing bloom strategy used for template_id and promoted attribute columns.
Changes:
- Enable bloom filters for
trace_idandspan_idin Parquet writer properties. - Add an integration test that pins bloom filter presence for
trace_id,span_id, andtemplate_id. - Register the new test module in the integration test harness.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| crates/ourios-parquet/src/writer.rs | Enables bloom filters on trace_id/span_id via writer properties to improve exact-id read pruning. |
| crates/ourios-parquet/tests/it/trace_bloom.rs | Adds a metadata-level assertion that bloom filters are written for the trace-context id columns. |
| crates/ourios-parquet/tests/it/main.rs | Wires the new trace_bloom integration test module into the test suite. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Random 16/8-byte ids defeat min/max statistics, so an exact-id lookup (RFC 0031 L3) degenerates to a whole-column scan: measured 72.4 MB for a 9-row trace on otel-demo-v8 (comparative run #12). Same §3.6 pattern as the template_id and promoted-column blooms; readers are unaffected (blooms are optional metadata) and DataFusion consults them by default. Validation: pre-merge comparative dispatch on this branch (run #13) per the maintainer's measure-before-merge workflow; the RFC 0005 §3.6 amendment text follows with the measured numbers. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WQY9wfrfRggqSpMLH8Xj3Y
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WQY9wfrfRggqSpMLH8Xj3Y
…ext ids Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WQY9wfrfRggqSpMLH8Xj3Y
61b27e5 to
ecfa74a
Compare
What
Bloom filters on
trace_idandspan_id(RFC 0005 §3.6 pattern, identical to the existingtemplate_idand promoted-column blooms). One writer-properties change + a metadata-pinning test.Measured result (pre-merge validation, run #14 on this branch — the measure-before-merge workflow)
The RFC 0031 L3 must-win flips to PASS on both metrics — the first L-class must-win pass in the comparative program:
The other three pairs are byte-identical on the Ourios side (deterministic store build), confirming the bloom perturbs nothing else. Equivalence held on all four pairs. Run #14 also validates #490's ingester-visibility fix: the L3 pair measured deterministically.
Why
Run #12 measured the no-bloom L3 baseline at 72.4 MB — the trace_id column scanned corpus-wide, because random ids defeat min/max statistics. Loki's side (105 MB fetched, 2.48 GB decompressed for 9 rows) is structural: trace ids cannot be labels in its model. DataFusion consults blooms by default (
bloom_filter_on_read = true).Invariants / hazards
§3.5: no schema change — blooms are optional column metadata; old readers and old files are unaffected in both directions. Writer-side only. The RFC 0005 §3.6 amendment text follows with these measured numbers (evidence-first sequencing per maintainer).
Checks run
cargo fmt --all --check,cargo clippy --all-targets --all-features -- -D warnings(workspace-wide),cargo nextest run -p ourios-parquet -p ourios-bench -p ourios-querier(447 passed). Pre-merge comparative bench: run #14 (29190408893), exit 0.🤖 Generated with Claude Code
https://claude.ai/code/session_01WQY9wfrfRggqSpMLH8Xj3Y