Skip to content

Commit 42abd34

Browse files
Correct documentation on comparing spatial values (#1023)
1 parent db22543 commit 42abd34

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2043,7 +2043,7 @@ label:removed[]
20432043
point({x:0, y:0}) <= point({x:1, y:1}) <= point({x:2, y:2})
20442044
----
20452045
a|
2046-
The ability to use operators `<`, `<=`, `>`, and `>=` on spatial points is removed.
2046+
The ability to use operators `<`, `+<=+`, `>`, or `>=` on spatial points is removed.
20472047
Instead, use:
20482048
[source, cypher, role="noheader"]
20492049
----

modules/ROOT/pages/syntax/operators.adoc

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -359,11 +359,9 @@ The following points give some details on how the comparison is performed.
359359
For example, `1 > b` and `1 < b` are both false when b is NaN.
360360
* String values are compared for ordering using lexicographic order (e.g. `"x" < "xy"`).
361361
* Boolean values are compared for ordering such that `false < true`.
362-
* *Comparison* of spatial values:
363-
** Point values can only be compared within the same Coordinate Reference System (CRS) -- otherwise, the result will be `null`.
364-
** For two points `a` and `b` within the same CRS, `a` is considered to be greater than `b` if `a.x > b.x` and `a.y > b.y` (and `a.z > b.z` for 3D points).
365-
** `a` is considered less than `b` if `a.x < b.x` and `a.y < b.y` (and `a.z < b.z` for 3D points).
366-
** If none if the above is true, the points are considered incomparable and any comparison operator between them will return `null`.
362+
* Spatial values cannot be compared using the operators `<`, `+<=+`, `>`, or `>=`.
363+
To compare spatial values within a specific range, use either the xref:functions/spatial.adoc#functions-withinBBox[`point.withinBBox()`] or the xref:functions/spatial.adoc#functions-point-wgs84-2d[`point()`] function.
364+
367365
* *Ordering* of spatial values:
368366
** `ORDER BY` requires all values to be orderable.
369367
** Points are ordered after arrays and before temporal types.

0 commit comments

Comments
 (0)