Add structural equality for UriParser SemanticAst clauses and nodes#3542
Draft
Copilot wants to merge 2 commits into
Draft
Add structural equality for UriParser SemanticAst clauses and nodes#3542Copilot wants to merge 2 commits into
Copilot wants to merge 2 commits into
Conversation
3 tasks
Copilot
AI
changed the title
[WIP] Add equality overrides for Filter, SelectAndExpand, Search, and other clauses
Add structural equality for UriParser SemanticAst clauses and nodes
May 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Parsed OData query options do not currently support structural equality, which makes semantic comparison of
$filter,$orderby,$search, and$select/$expandtrees difficult for caching and tests. This change adds draft equality support across the core SemanticAst surface used by those parsed query options.Public equality surface
IEquatable<T>,Equals, andGetHashCodeto:QueryNodeRangeVariableFilterClauseOrderByClauseSearchClauseSelectExpandClauseStructural comparison implementation
SemanticAstStructuralEqualityComparerto compare bound query trees by structure rather than object identity.QueryNodegraphsRangeVariablestateSelectItem/ expand item treesODataPathinstancesComputeClause,LevelsClause, andApplyClauseSelect/expand support
SelectExpandClausenow walks selected items and nested options instead of relying on reference equality.API baseline
PublicAPI.Unshipped.txtbaselines for supported target frameworks.Regression coverage
$filter$orderby$search$select/$expandExample: