Skip to content

Comments

fix: resolve ParameterReference in MERGE property matching#2

Merged
ExtReMLapin merged 1 commit intofixissue3476from
claude/fix-opencypher-engine-4rpm3
Feb 18, 2026
Merged

fix: resolve ParameterReference in MERGE property matching#2
ExtReMLapin merged 1 commit intofixissue3476from
claude/fix-opencypher-engine-4rpm3

Conversation

@ExtReMLapin
Copy link
Owner

When a MERGE query used parameter references (e.g., $username) in node properties, the ParameterReference objects were not resolved before property matching. This caused MERGE to always create a new node instead of finding the existing one, mirroring the bug that was already fixed in MatchNodeStep.matchesProperties().

The fix adds ParameterReference resolution in MergeStep.evaluateProperties(), which is called before matchesProperties() for both node and edge patterns.

Regression tests added to OpenCypherMergeTest:

  • mergeFindsNodeWithParameterReference: verifies no duplicate is created
  • mergeCreatesNodeWithParameterReference: verifies creation still works

https://claude.ai/code/session_012HJWpf6hyoiJSrFo2Wyim1

What does this PR do?

A brief description of the change being made with this pull request.

Motivation

What inspired you to submit this pull request?

Related issues

A list of issues either fixed, containing architectural discussions, otherwise relevant
for this Pull Request.

Additional Notes

Anything else we should know when reviewing?

Checklist

  • I have run the build using mvn clean package command
  • My unit tests cover both failure and success scenarios

When a MERGE query used parameter references (e.g., $username) in node
properties, the ParameterReference objects were not resolved before
property matching. This caused MERGE to always create a new node instead
of finding the existing one, mirroring the bug that was already fixed in
MatchNodeStep.matchesProperties().

The fix adds ParameterReference resolution in MergeStep.evaluateProperties(),
which is called before matchesProperties() for both node and edge patterns.

Regression tests added to OpenCypherMergeTest:
- mergeFindsNodeWithParameterReference: verifies no duplicate is created
- mergeCreatesNodeWithParameterReference: verifies creation still works

https://claude.ai/code/session_012HJWpf6hyoiJSrFo2Wyim1
@ExtReMLapin ExtReMLapin merged commit 41fdc93 into fixissue3476 Feb 18, 2026
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants