refactor(cypher): filter unknown props before sort/dedup#523
Merged
Conversation
Surfaced by /simplify on PR #521. A well-formed query (every property known) becomes empty after the retain and skips sort/dedup/suggest entirely, instead of cloning every property name, sorting, then filtering them all out. Behaviour unchanged; the diagnostics unit tests still pass.
Contributor
ecp impact cache (0 symbols) — internal, used by
|
coseto6125
added a commit
that referenced
this pull request
May 31, 2026
The v0.6.2 section was generated by the release-PR (#524) bump before #523/#525/#526 merged, so it listed only #520/#521/#522. Backfill the three before tagging v0.6.2 so the release notes match what the tag actually ships: - #525 field-reassign collision fix (Bug Fixes) - #523 cypher prop-filter refactor (Refactor) - #526 `--file` flag rename (Chore)
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.
Follow-up cleanup surfaced by `/simplify` on PR #521 (after it merged).
`unknown_properties` collected every property name, sorted + deduped, then filtered out the known ones — so a well-formed query (the common case, every property known) paid N short-string clones + a sort only to discard everything.
Moving the `retain(!is_known)` ahead of sort/dedup makes the well-formed query empty immediately and skip the rest. Behaviour is identical; the diagnostics unit tests (typo+suggestion, camelCase/startLine known, edge props, WITH/UNION walk, dedup) still pass.
Pure quality change, no schema/parser surface — 14-language rule N/A.