Skip to content

test: add SQL netflow corpus - #107

Merged
zzylol merged 3 commits into
mainfrom
test/asapquery-sql-corpus
Jul 7, 2026
Merged

zzylol merged 3 commits into
mainfrom
test/asapquery-sql-corpus

Conversation

@zzylol

@zzylol zzylol commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a netflow SQL corpus fixture for the netflow benchmark query families
  • cover quantile, count top-k, sum-ranked top-k input, cardinality, max, and nested aggregate shapes
  • keep this as test-only coverage using SQL syntax already supported by the DataFusion SQL front end
  • organize the corpus in a tests/netflow/ domain folder (test .rs + data/), mirroring tests/data_quality_check/

Tests

  • cargo test -p asap-frontend-sql

@zzylol
zzylol force-pushed the test/asapquery-sql-corpus branch from 329ceae to d58ef68 Compare July 7, 2026 11:44
@zzylol zzylol changed the title test: add ASAPQuery SQL support corpus test: add ASAPQuery SQL netflow corpus Jul 7, 2026
@zzylol

zzylol commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

@milindsrivastava1997 FYI

Move the netflow SQL corpus test into an `asapquery/` domain folder so it
mirrors the `data_quality_check/` layout: the test `.rs` lives inside the
domain folder alongside its `data/` subdirectory, declared explicitly in
Cargo.toml since Cargo only auto-discovers `.rs` files directly in `tests/`.

- tests/asapquery_sql_netflow.rs -> tests/asapquery/netflow.rs
- include_str! path -> "data/netflow.sql"
- add [[test]] name = "asapquery_netflow"

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@zzylol

zzylol commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

@milindsrivastava1997 Added you as a reviewer.
I'm also not sure how ASAPQuery term should be included in this repo.
I also want to add Netflow corpus, not ASAPQuery-supported-Netflow corpus. What do you think?

@milindsrivastava1997

milindsrivastava1997 commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

I'm also not sure how ASAPQuery term should be included in this repo.

No need I think.

Rename the domain folder and all identifiers to use only "sql" and
"netflow" terms.

- tests/asapquery/netflow.rs -> tests/netflow/netflow.rs
- [[test]] name asapquery_netflow -> netflow
- test fn / doc comments drop the ASAPQuery references

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@zzylol zzylol changed the title test: add ASAPQuery SQL netflow corpus test: add SQL netflow corpus Jul 7, 2026
@zzylol
zzylol merged commit 9fdd3d7 into main Jul 7, 2026
2 checks passed
@zzylol
zzylol deleted the test/asapquery-sql-corpus branch July 7, 2026 12:38
zzylol added a commit that referenced this pull request Jul 9, 2026
…113)

`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>
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