Skip to content

RFC 017 aggregate modifiers#45

Merged
dannymeijer merged 5 commits into
mainfrom
feature/34-rfc017-aggregate-modifiers
May 27, 2026
Merged

RFC 017 aggregate modifiers#45
dannymeijer merged 5 commits into
mainfrom
feature/34-rfc017-aggregate-modifiers

Conversation

@dannymeijer
Copy link
Copy Markdown
Collaborator

@dannymeijer dannymeijer commented May 25, 2026

Summary

  • Adds registry-backed aggregate modifier metadata plus AggregateMeasure.distinct(), .filter(...), and .order_by(...) state.
  • Adds count_distinct(expr) and count_if(predicate) compatibility helpers as decorator-registered aggregate rewrites.
  • Exposes canonical count() / count(expr) behavior now that Incan rc20 preserves decorated default-call metadata through public facades; keeps count_expr(expr) as a compatibility rewrite.
  • Lowers distinct/filter aggregate modifiers into Substrait, validates invalid modifier shapes, and keeps Prism cross-store adoption sensitive to aggregate modifier state.
  • Updates aggregate docs, function catalog docs, release notes, CI's expected Incan version, and marks RFC 017 implemented.
  • Merged with current origin/main after RFC 016/018/024 wave 1 function catalog foundations #44 and removed the same redundant-helper/source-quality smells found during the RFC 016/018/024 wave 1 function catalog foundations #44 review loop.

Merge Order

#44 has been merged. This PR now targets main directly and can be reviewed as the RFC 017 follow-up.

Requires Incan release/v0.3 at 0.3.0-rc20 or later for decorated default-call metadata through re-export facades.

Verification

  • cargo build --bin incan in /Users/danny/Development/encero/incan -> incan 0.3.0-rc20
  • make fmt INCAN=/Users/danny/Development/encero/incan/target/debug/incan
  • /Users/danny/Development/encero/incan/target/debug/incan test src/functions/aggregates
  • /Users/danny/Development/encero/incan/target/debug/incan test tests/test_function_registry.incn
  • /Users/danny/Development/encero/incan/target/debug/incan test tests/test_substrait_plan.incn
  • /Users/danny/Development/encero/incan/target/debug/incan test tests/test_session_aggregates.incn
  • /Users/danny/Development/encero/incan/target/debug/incan test tests/test_dataset.incn
  • /Users/danny/Development/encero/incan/target/debug/incan test tests/test_prism.incn
  • make fmt-check INCAN=/Users/danny/Development/encero/incan/target/debug/incan
  • make build INCAN=/Users/danny/Development/encero/incan/target/debug/incan
  • make pre-commit INCAN=/Users/danny/Development/encero/incan/target/debug/incan -> 122 tests passed
  • make smoke-consumer INCAN=/Users/danny/Development/encero/incan/target/debug/incan

Closes #34

@dannymeijer dannymeijer marked this pull request as ready for review May 27, 2026 13:24
@dannymeijer dannymeijer merged commit df0ad0c into main May 27, 2026
5 checks passed
@dannymeijer dannymeijer deleted the feature/34-rfc017-aggregate-modifiers branch May 27, 2026 13:27
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.

RFC 017: Aggregate modifiers

1 participant