Skip to content

test(querier): rfc 0022 green pt3 — pruning + promoted-set drift (RFC0022.5/.7) - #347

Merged
jensholdgaard merged 2 commits into
mainfrom
rfc0022-green-pt3
Jul 3, 2026
Merged

test(querier): rfc 0022 green pt3 — pruning + promoted-set drift (RFC0022.5/.7)#347
jensholdgaard merged 2 commits into
mainfrom
rfc0022-green-pt3

Conversation

@jensholdgaard

@jensholdgaard jensholdgaard commented Jul 3, 2026

Copy link
Copy Markdown
Owner

RFC 0022 green pt3 — the pruning slice. Discharges the last two §5 scenarios, RFC0022.5 (promoted predicates prune) and RFC0022.7 (promoted-set drift), completing all seven at the test level.

What

  • RFC0022.5 — the rfc0007_1 shape (counters, not wall-clock): three files in distinct hours, the needle value of a configured promoted key concentrated in one. A selective equality query answers with row_groups_pruned >= 2 and scanned < total via the RFC 0016 counters. This also empirically pins that DataFusion's pruning predicate handles the §3.3 two-arm compile: in non-matching row groups the typed arm is excluded by min/max statistics and the P IS NULL AND <JSON LIKE> fallback arm by a zero null-count — the steady-state fast path §3.3 claims. B1/B2 are the bench gates and are untouched by construction (this test asserts counters only; indicative bench dispatch per the standing policy remains available on demand).
  • RFC0022.7 — three files written under configured sets {}, {a}, {a,b} (a = k8s.namespace.name resource, b = http.route log, each on top of the implicit service.name). One scan unions the schemas without error (the §3.9 case, backed by the feat(querier): rfc 0022 green pt2 — promoted predicate compile (RFC0022.3/.4/.6) #346 union fix); ==/!= on both keys answer correctly from every file (typed arm where the column exists and is non-NULL, JSON arm otherwise, with row identity pinned per file), and ordering stays typed-arm-only under drift.

Test-only: one file changed, the two #[ignore]d red stubs implemented and un-ignored. No production code touched.

RFC status

Deliberately still red: §5 is now 7/7 in CI, but §3.2's storage.promoted_attributes config key does not parse yet (ourios-server's strict RFC 0020 schema rejects it, and the ingester writes with the default set) — the operator-facing surface the RFC promises isn't deliverable until that plumbing lands. The follow-up slice adds the config extension + ingester threading and flips the status to green as the completing PR.

Invariants / hazards (CLAUDE.md §3/§4)

Verification

cargo fmt --all --check, cargo clippy --all-targets --all-features -- -D warnings, cargo test --all-features — all green locally.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests
    • Added coverage for two previously untested query scenarios involving promoted attributes.
    • Verified filtering and pruning behavior when data is concentrated in specific files and row groups.
    • Added checks for mixed attribute configurations across files, including correct match counts and ordering behavior under drift.

RFC0022.5/.7 go green, completing all seven §5 scenarios at the test
level. .5 pins that the §3.3 two-arm compile prunes: in non-matching
row groups the typed arm is excluded by min/max statistics and the
P-IS-NULL fallback guard by a zero null-count (the steady-state fast
path). .7 spans one scan over files written under configured sets {},
{a}, {a,b} — the union scans without error and both keys answer
correctly from every file. RFC status stays red until the §3.2
storage.promoted_attributes config plumbing lands (the operator-facing
knob is still rejected by the strict RFC 0020 schema).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@jensholdgaard
jensholdgaard requested a review from Copilot July 3, 2026 20:26
@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@jensholdgaard, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 53 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 8523810c-bbc2-436d-aa3e-b26beff4ab01

📥 Commits

Reviewing files that changed from the base of the PR and between a4f5a0f and da405b2.

📒 Files selected for processing (1)
  • crates/ourios-querier/tests/rfc0022_attr_columns.rs
📝 Walkthrough

Walkthrough

Two previously ignored test stubs (todo! placeholders) for RFC0022.5 and RFC0022.7 in the querier test suite are replaced with functioning async tests that write parquet files with varying promoted attribute configurations and assert query correctness, pruning stats, and predicate semantics.

Changes

RFC0022 attribute promotion tests

Layer / File(s) Summary
Promoted predicate pruning test
crates/ourios-querier/tests/rfc0022_attr_columns.rs
New async test writes multiple hour-partitioned parquet files sharing a promoted key set, queries on the promoted key, and asserts exact matched row count plus pruning stats (row groups pruned, bytes read, row groups scanned).
Promoted-set drift test
crates/ourios-querier/tests/rfc0022_attr_columns.rs
New async test writes three parquet files under different promoted-attribute configurations, runs union scans, and asserts predicate results differ correctly between typed-arm and JSON fallback paths, including template_id identity and typed-arm-only ordering behavior.

Estimated code review effort: 2 (Simple) | ~15 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is detailed, but it misses the required Related section and checklist items from the template. Add a Related section with linked issue/RFC references and a Checklist matching the template, including tests, lint, docs, and RFC linkage.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main test-only change: RFC0022 pruning and promoted-set drift scenarios.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch rfc0022-green-pt3

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Implements the remaining RFC 0022 querier acceptance tests for promoted attribute columns, specifically covering pruning behavior and schema/predicate correctness under promoted-set drift across deploys.

Changes:

  • Implements RFC0022.5 test to assert promoted-equality predicates prune non-matching row groups and report RFC 0016 scan/prune counters.
  • Implements RFC0022.7 test to validate union scanning across files written with promoted sets {}, {a}, {a,b}, including correct ==/!= behavior and typed-arm-only ordering under drift.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread crates/ourios-querier/tests/rfc0022_attr_columns.rs
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

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.

2 participants