Repository navigation
fix(query): preserve bound constraints in same-entity plans - #47
Merged
Merged
Conversation
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
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.
Summary
Reject the same-entity relation fast path whenever a positive pattern contains a value term the plan cannot enforce. Previously, binding a singleton
Arg_collection [Result_entity 200]replaced?twithQEntity 200, which this plan silently discarded. A query such as[:where [?b :block/tags ?t] [?b :block/uuid]]consequently returned untagged entities as well as matching entities. Declining that plan preserves the constraints through the existing evaluator; no public API or worker-specific filtering changes.Add one public
q_stringtable regression covering matching, absent, multiple, ref-value, and empty collection inputs.Validation
7acb4e8c324f9aee81e9feb936da75b49ee4c0abusing this same patch.test_query_engine_fixes,test_query_bound_constants, and existingtest_perfpass on current main; the query regression suite also passes when compiled with Melange.dune runtestis blocked during upstream fixture compilation by Maven Central HTTP 429, including a retry against its alternate official domain. Optional@alladditionally requires the unavailablelg.edn-backendlibrary. No test gates or expectations were weakened; CI must finish full cross-runtime validation.A production-baseline-only release of the identical patch is available at 0dd20de9c2640924dcc261cc20dfc3eeb68b9b33, avoiding unrelated main changes. This PR itself contains only the fix and its regression relative to main.
Link to Devin session: https://app.devin.ai/sessions/0deab4d81eb24545b9d705374171afc1
Open in Devin Desktop: https://app.devin.ai/desktop/session/0deab4d81eb24545b9d705374171afc1?variant=devin
Requested by: @tiensonqin