Skip to content

feat(repl): SQL filter() with WHERE/HAVING, FilterSpec, and dual straddling filters#46

Merged
aisrael merged 2 commits intomainfrom
feat/repl-filter-pipeline-order
Apr 10, 2026
Merged

feat(repl): SQL filter() with WHERE/HAVING, FilterSpec, and dual straddling filters#46
aisrael merged 2 commits intomainfrom
feat/repl-filter-pipeline-order

Conversation

@aisrael
Copy link
Copy Markdown
Owner

@aisrael aisrael commented Apr 7, 2026

Summary

Adds REPL filter("...") for DataFusion SQL predicates, with placement before or after select (and optional group_by). Supports two filter stages when they straddle select(...) for WHERE-like plus HAVING-like predicates in one pipeline. Introduces FilterSpec as a newtype for filter SQL strings on the pipeline builder.

Key changes

  • REPL: Parse and validate filter; up to two filters only if one is strictly before and one strictly after select; docs in docs/REPL.md.
  • Pipeline: filter_before_select / filter_after_select as Option<FilterSpec>; finalize_dataframe_source applies before → select/aggregate → after.
  • Breaking (programmatic): Replaces older single-filter API; callers set one or both filter options explicitly (REPL bridge maps stages).

Verification

cargo +nightly fmt, cargo clippy --all-targets -- -D warnings, cargo test pass locally.

@aisrael aisrael changed the title feat(repl): SQL filter() stage with flexible order vs select feat(repl): SQL filter() with WHERE/HAVING, FilterSpec, and dual straddling filters Apr 8, 2026
@aisrael aisrael merged commit 4d191a5 into main Apr 10, 2026
4 checks passed
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