Skip to content

Extract EqualityValueSet for filter value set re-use#1239

Merged
myronmarston merged 2 commits into
block:mainfrom
marcdaniels-toast:mdaniels/equality-value-set-extraction
Jun 5, 2026
Merged

Extract EqualityValueSet for filter value set re-use#1239
myronmarston merged 2 commits into
block:mainfrom
marcdaniels-toast:mdaniels/equality-value-set-extraction

Conversation

@marcdaniels-toast

Copy link
Copy Markdown
Contributor

Summary

  • Introduces EqualityValueSet, extracted from the former RoutingValueSet, as a reusable inclusive/exclusive set with union, intersection, and negate operations
  • Eliminates RoutingValueSet entirely — its two-line conversion logic now lives inline in RoutingPicker#extract_eligible_routing_values
  • Adds FilterValueSetExtractor.for_equality as a factory method that configures an extractor for equal_to_any_of filters using EqualityValueSet, reducing boilerplate for callers

This is a preliminary refactor in support of __typename-based index narrowing (#1179), where EqualityValueSet and FilterValueSetExtractor.for_equality will be reused by the new narrowing logic.

… extraction.

Introduces `EqualityValueSet`, extracted from `RoutingValueSet`, to serve as a
reusable inclusive/exclusive set for use with `FilterValueSetExtractor`. Adds
`FilterValueSetExtractor.for_equality` as a factory method to reduce boilerplate
for callers.

@myronmarston myronmarston left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for doing this extraction as its own PR! It makes review easy :).

@marcdaniels-toast

Copy link
Copy Markdown
Contributor Author

Oops, sorry I forgot to run quick_build on this branch before I posted it. In too much of a hurry to put up this PR. I'll fix it up!

- Move to `Filtering` namespace (alongside its only caller, `FilterValueSetExtractor`)
- Remove uncovered `include?` method (will be re-introduced in follow-up PR)
- Restore `get_included_and_excluded_values` private helper, collapsing the
  two-branch mixed inclusive/exclusive case in `union` to a single branch
- Update class comment per reviewer suggestion
- Drop now-unnecessary `@dynamic` annotation

Generated with Claude Code
@myronmarston myronmarston enabled auto-merge (squash) June 5, 2026 19:36
@myronmarston myronmarston merged commit 0bb1107 into block:main Jun 5, 2026
19 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.

2 participants