From b575b007701677bfa32ae0d9b48bc02d51783181 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20Pryce-=C3=85klundh?= <112686610+JPryce-Aklundh@users.noreply.github.com> Date: Wed, 14 Aug 2024 14:49:29 +0200 Subject: [PATCH 1/2] clarify comparing spatial values --- .../deprecations-additions-removals-compatibility.adoc | 2 +- modules/ROOT/pages/syntax/operators.adoc | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc b/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc index 83437bedb..9604c2c2a 100644 --- a/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc +++ b/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc @@ -2114,7 +2114,7 @@ label:removed[] point({x:0, y:0}) <= point({x:1, y:1}) <= point({x:2, y:2}) ---- a| -The ability to use operators `<`, `<=`, `>`, and `>=` on spatial points is removed. +The ability to use operators `<`, `+<=+`, `>`, and `>=` on spatial points is removed. Instead, use: [source, cypher, role="noheader"] ---- diff --git a/modules/ROOT/pages/syntax/operators.adoc b/modules/ROOT/pages/syntax/operators.adoc index c5e8075cf..a34fb5454 100644 --- a/modules/ROOT/pages/syntax/operators.adoc +++ b/modules/ROOT/pages/syntax/operators.adoc @@ -359,11 +359,9 @@ The following points give some details on how the comparison is performed. For example, `1 > b` and `1 < b` are both false when b is NaN. * String values are compared for ordering using lexicographic order (e.g. `"x" < "xy"`). * Boolean values are compared for ordering such that `false < true`. -* *Comparison* of spatial values: - ** Point values can only be compared within the same Coordinate Reference System (CRS) -- otherwise, the result will be `null`. - ** 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). - ** `a` is considered less than `b` if `a.x < b.x` and `a.y < b.y` (and `a.z < b.z` for 3D points). - ** If none if the above is true, the points are considered incomparable and any comparison operator between them will return `null`. +* Spatial points cannot be compared using the operators `<`, `+<=+`, `>`, and `>=`. +To compare spatial points within a specific range, use either the xref:functions/spatial.adoc#functions-withinBBox[`point.withinBBox()`] or the xref:functions/spatial.adoc#functions-point[`point()`] function. + * *Ordering* of spatial values: ** `ORDER BY` requires all values to be orderable. ** Points are ordered after arrays and before temporal types. From 4259e5434bae1d4a967ef58637f71324307c8fa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20Pryce-=C3=85klundh?= <112686610+JPryce-Aklundh@users.noreply.github.com> Date: Wed, 14 Aug 2024 14:58:45 +0200 Subject: [PATCH 2/2] fix --- .../pages/deprecations-additions-removals-compatibility.adoc | 2 +- modules/ROOT/pages/syntax/operators.adoc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc b/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc index 9604c2c2a..2808281b2 100644 --- a/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc +++ b/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc @@ -2114,7 +2114,7 @@ label:removed[] point({x:0, y:0}) <= point({x:1, y:1}) <= point({x:2, y:2}) ---- a| -The ability to use operators `<`, `+<=+`, `>`, and `>=` on spatial points is removed. +The ability to use operators `<`, `+<=+`, `>`, or `>=` on spatial points is removed. Instead, use: [source, cypher, role="noheader"] ---- diff --git a/modules/ROOT/pages/syntax/operators.adoc b/modules/ROOT/pages/syntax/operators.adoc index a34fb5454..b6ce384ab 100644 --- a/modules/ROOT/pages/syntax/operators.adoc +++ b/modules/ROOT/pages/syntax/operators.adoc @@ -359,8 +359,8 @@ The following points give some details on how the comparison is performed. For example, `1 > b` and `1 < b` are both false when b is NaN. * String values are compared for ordering using lexicographic order (e.g. `"x" < "xy"`). * Boolean values are compared for ordering such that `false < true`. -* Spatial points cannot be compared using the operators `<`, `+<=+`, `>`, and `>=`. -To compare spatial points within a specific range, use either the xref:functions/spatial.adoc#functions-withinBBox[`point.withinBBox()`] or the xref:functions/spatial.adoc#functions-point[`point()`] function. +* Spatial values cannot be compared using the operators `<`, `+<=+`, `>`, or `>=`. +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. * *Ordering* of spatial values: ** `ORDER BY` requires all values to be orderable.