Skip to content

fix(test): cover QueryExpr::TimeShift in the netflow corpus visitor - #113

Merged
zzylol merged 1 commit into
mainfrom
fix/netflow-timeshift-match
Jul 9, 2026
Merged

zzylol merged 1 commit into
mainfrom
fix/netflow-timeshift-match

Conversation

@zzylol

@zzylol zzylol commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

main currently does not compile:

$ cargo test -p asap-frontend-sql --test netflow
error[E0004]: non-exhaustive patterns: `&QueryExpr::TimeShift { .. }` not covered
   --> crates/frontend-sql/tests/netflow/netflow.rs:257:11

Cause

#106 added QueryExpr::TimeShift (the offset / @ lowering for #40). #107 added the netflow corpus, whose visit() matches QueryExpr exhaustively, and was branched before #106 landed. Each PR was green against its own base; neither was rebased before merge, so the conflict only materialised once both were on main. It is a semantic conflict, not a textual one, so git merged it cleanly.

Fix

TimeShift { shift, child } is a single-child pass-through, so it joins the existing recurse-into-child arm.

Verification

cargo clippy --all-targets     # clean, was: error[E0004]
cargo test --workspace         # all green

🤖 Generated with Claude Code

`main` does not compile: `cargo test -p asap-frontend-sql --test netflow`
fails with E0004, non-exhaustive patterns.

PR #106 added `QueryExpr::TimeShift` (the `offset` / `@` lowering for #40).
PR #107 added the netflow corpus, whose `visit()` matches `QueryExpr`
exhaustively, and was branched before #106 landed. Each PR was green on its
own base; neither was rebased, so the breakage only appeared once both were
on `main`.

`TimeShift` is a single-child pass-through, so it joins the existing
recurse-into-`child` arm.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@zzylol
zzylol merged commit da2ac8e into main Jul 9, 2026
1 check passed
@zzylol
zzylol deleted the fix/netflow-timeshift-match branch July 9, 2026 15:30
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