Conversation
The right side of a comparison read one identifier. Title == Author.Name threw ParsingException, and the README examples with a path on the right side (Rating > Author.Score) did not work. Read a dotted property path on the right side. A path that does not resolve to a property stays a value. BREAKING CHANGE: an unquoted dotted word on the right side no longer throws ParsingException. Title == Author.Name compares the two properties. Title == foo.bar compares Title with the string "foo.bar".
pdevito3
force-pushed
the
fm/qk-breaking-right-side-path
branch
from
October 1, 2026 21:38
d0c89f8 to
4d42f5a
Compare
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.
For later consideration in a major version. Do not merge now. #134 restored the v1.14.2 right side to keep v1.x compatible (restore commit
2b1c252). This PR re-applies71b4c40(#113). The captain decides on this PR separately.Summary
The right side of a comparison reads a dotted property path, not only one word. The change is in
QueryKit/FilterParser.csonly.v1.14.2 behavior (and main)
The right side reads one identifier. An unquoted dotted word on the right side throws
ParsingException. The README shows right-side paths (Email.Value == CollectionEmail.Value,Rating > Author.Score), but these examples throw.New behavior
An unquoted dotted word on the right side is read as one value:
Title == foo.barcomparesTitlewith"foo.bar".Example
ParsingExceptionwith the innerInvalidOperationException"The binary operator Equal is not defined for the types 'System.String' and ... Author".x => (x.Title == x.Author.Name).Justification
The README documents property paths on the right side, and a path works on the left side. The right side must accept the same paths.
Migration
A filter that relied on the
ParsingExceptionfor an unquoted dotted word now returns rows. To compare with the literal text, quote it:Title == "Author.Name".Interaction with #136 (item I)
Before #134, main also checked a right-side path with
PropertyResolver.Resolve. This check is part of item I (#136), not of this PR. With this PR alone:MaxPropertyDepthis not compared. It becomes a string value:Title == Author.NamewithMaxPropertyDepth = 0givesx => (x.Title == "Author.Name"). Main before fix: restore v1.14.2 behavior for every breaking change on main #134 threwQueryKitPropertyDepthExceededException.PreventFilteris compared. This is the same gap that main has for a one-word right side (FirstName == LastName). fix(filter)!: apply PreventFilter and PreventSort to every property path #136 closes the gap for both.After #136 and this PR are both merged, bring back these 2 unit tests from main before #134 (
PropertyResolverTests):property_path_on_the_right_side_obeys_max_property_depthprevented_property_path_on_the_right_side_removes_the_clauseI merged the two rebased branches locally and added the 2 tests: 476 unit tests pass, 0 failures. Each test needs both changes, so neither PR can carry them alone.
README
No change. The README already shows right-side paths in "Child Property Comparisons". This PR makes these examples work.
Tests
These tests come back from main before #134:
PropertyResolverTests.property_path_on_the_right_side_throwsbecomesproperty_path_on_the_right_side_is_compared.PropertyResolverTests.property_path_on_the_right_side_is_compared(Postgres): only the recipe withTitleequal toAuthor.Namecomes back.Unit
PropertyResolverTests.unquoted_dotted_word_on_the_right_side_throwsis removed. #134 added this pin for the v1.14.2 throw.dotnet test: 469 unit tests and 298 Postgres integration tests (Testcontainers) pass, 0 failures.Rebase on main
This branch is rebased on current main. On main,
SquareBracketParseralready returns aRightSideValue, so the rebase keeps it as it is.