Skip to content

TUR-302: Cypher: read the components of a point - #1334

Merged
rjb32 merged 2 commits into
mainfrom
remyboutonnet/tur-302-2-point-components
Nov 6, 2026
Merged

rjb32 merged 2 commits into
mainfrom
remyboutonnet/tur-302-2-point-components

Conversation

@rjb32

@rjb32 rjb32 commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Read the components of a point.

@rjb32

rjb32 commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor Author

Note

AI-generated summary.

Summary

Goal. Read a point's fields: p.x, p.y, p.z, p.longitude, p.latitude, p.height, p.crs and p.srid, on a variable, a property (n.at.latitude), a point inside a list, and in a map projection (p {.longitude, .crs}).

Approach. The analyzer treats a point like a datetime or a duration: PointPart is resolved at analysis and each part lowers to one op (db.point_x ... db.point_srid), following the datetime component ops. A part's type depends on the part: a coordinate is a double, crs a string, srid an integer. p.z on a 2D point and p.latitude on a cartesian one raise on that row, as in Neo4j, so those four ops are MayRaise and never speculatable. A point inside a tagged cell is read through the map-key path, which now knows points.

Where to look.

  • query/analyzer/ExprAnalyzer.cpp:573: the component branch that now covers points
  • query/ir/dialect/db/DBOps.td:3056 PointZ: why four of the eight ops may raise
  • storage/columns/Functions.h:611 PointComponentFunction: the per-row read
  • query/ir/exec/NLExecutor.cpp:5679 pointComponentCell: p.x on a tagged cell
 readStaticKey(keyed)
   DateTime -> componentCell(instant)
   Duration -> componentCell(duration)
+  Point    -> pointComponentCell(point)

Evidence

  • Before: WITH point({x: 1, y: 2}) AS p RETURN p.x has no point component to read.
    After:
    test_query_ir_point_component   [  PASSED  ] 15 tests.
    map projection, temporal map projection, datetime and duration component suites: 14/14 passed
    

Merge Danger

Door: two-way

Blast Radius: query

The "map projection reads ..." error now lists points; the two tests that pin it are updated.

@rjb32
rjb32 added this pull request to stack #1347 November 5, 2026 22:38
@rjb32
rjb32 force-pushed the remyboutonnet/tur-302-1-point-type branch from d47c5a1 to 2f7899c Compare November 6, 2026 09:22
@rjb32
rjb32 force-pushed the remyboutonnet/tur-302-2-point-components branch from 0c25503 to 710e354 Compare November 6, 2026 09:22
@rjb32
rjb32 force-pushed the remyboutonnet/tur-302-1-point-type branch from 2f7899c to f7d7f49 Compare November 6, 2026 15:59
@rjb32
rjb32 force-pushed the remyboutonnet/tur-302-2-point-components branch from 710e354 to ba77ea3 Compare November 6, 2026 15:59
@rjb32
rjb32 force-pushed the remyboutonnet/tur-302-1-point-type branch from f7d7f49 to 7c9742d Compare November 6, 2026 19:19
@rjb32
rjb32 force-pushed the remyboutonnet/tur-302-2-point-components branch from ba77ea3 to 27aab73 Compare November 6, 2026 19:19
@rjb32
rjb32 removed this pull request from stack #1347 November 6, 2026 19:36
@rjb32
rjb32 changed the base branch from remyboutonnet/tur-302-1-point-type to main November 6, 2026 19:37
@rjb32
rjb32 merged commit 27aab73 into main Nov 6, 2026
4 checks passed
@rjb32
rjb32 deleted the remyboutonnet/tur-302-2-point-components branch November 6, 2026 19:37
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.

1 participant