Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 44 additions & 1 deletion modules/ROOT/pages/errors/gql-errors/22N31.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,50 @@


== Status description
error: data exception - invalid properties in merge pattern. `MERGE` cannot be used with graph element property values that are null or NaN.
error: data exception - invalid properties in merge pattern. The `{ <<entityType>> }` property `{ <<propKey>> }` in `{ <<pat>> }` is invalid. `MERGE` cannot be used with a graph element property value that is `{ <<value>> }`.

== Explanation
This error occurs when a `MERGE` pattern includes a node or relationship property value that is not allowed, such as `null` or `NaN`.
Because `MERGE` must be able to match or create a concrete graph element, these invalid values are rejected.

== Example scenarios

Let's take the following example scenarios:

=== Null property value in a `MERGE` pattern
For example, try to merge a node with a `null` property value as follows:

[source,cypher]
----
MERGE (p:Person {age: null})
----

The query returns an error with GQLSTATUS 22N31 and the status description:

[source]
----
error: data exception - invalid properties in merge pattern. The node property 'age' in '(:Person {age: null})' is invalid. `MERGE` cannot be used with a graph element property value that is null.
----

In this case, provide a concrete value for the property, or remove it from the `MERGE` pattern.

=== NaN property value in a `MERGE` pattern
For example, try to merge a relationship with a `NaN` property value as follows:

[source,cypher]
----
WITH 0.0/0.0 AS nan
MERGE (a:Person)-[:KNOWS {score: nan}]->(b:Person)
----

The query returns an error with GQLSTATUS 22N31 and the status description:

[source]
----
error: data exception - invalid properties in merge pattern. The relationship property 'score' in '(:Person)-[:KNOWS {score: NaN}]->(:Person)' is invalid. 'MERGE' cannot be used with graph element property value that is NaN.
----

In this case, provide a numeric value for the property, or remove it from the `MERGE` pattern.


ifndef::backend-pdf[]
Expand Down
2 changes: 1 addition & 1 deletion modules/ROOT/pages/errors/gql-errors/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ Status description:: error: data exception - missing temporal unit. At least one

=== xref:errors/gql-errors/22N31.adoc[22N31]

Status description:: error: data exception - invalid properties in merge pattern. `MERGE` cannot be used with graph element property values that are null or NaN.
Status description:: error: data exception - invalid properties in merge pattern. The `{ <<entityType>> }` property `{ <<propKey>> }` in `{ <<pat>> }` is invalid. `MERGE` cannot be used with a graph element property value that is `{ <<value>> }`.

=== xref:errors/gql-errors/22N32.adoc[22N32]

Expand Down