Skip to content

refactor(cypher): filter unknown props before sort/dedup#523

Merged
coseto6125 merged 1 commit into
mainfrom
refactor/cypher-filter-before-sort
May 31, 2026
Merged

refactor(cypher): filter unknown props before sort/dedup#523
coseto6125 merged 1 commit into
mainfrom
refactor/cypher-filter-before-sort

Conversation

@coseto6125
Copy link
Copy Markdown
Owner

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.

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.
@coseto6125 coseto6125 enabled auto-merge (squash) May 31, 2026 00:26
@coseto6125 coseto6125 added the merge-queue Opt-in to Mergify merge queue label May 31, 2026
@github-actions
Copy link
Copy Markdown
Contributor

ecp impact cache (0 symbols) — internal, used by ecp dev pr-analyze

[]

@github-actions github-actions Bot added the ecp:risk-low ecp signal label May 31, 2026
@coseto6125 coseto6125 merged commit 613a12d into main May 31, 2026
18 checks passed
@coseto6125 coseto6125 deleted the refactor/cypher-filter-before-sort branch May 31, 2026 00:56
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ecp:risk-low ecp signal merge-queue Opt-in to Mergify merge queue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant