Skip to content

TUR-302: Import: read points from JSONL - #1337

Merged
rjb32 merged 5 commits into
mainfrom
remyboutonnet/tur-302-5-jsonl-points
Nov 6, 2026
Merged

rjb32 merged 5 commits into
mainfrom
remyboutonnet/tur-302-5-jsonl-points

Conversation

@rjb32

@rjb32 rjb32 commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Read points from JSONL.

@rjb32

rjb32 commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

Note

AI-generated summary.

Summary

Goal. LOAD JSONL '/data/cities.jsonl' WITH POINTS [at] reads "at": {"longitude": 2.3522, "latitude": 48.8566} as a point.

Approach. WITH POINTS fills the typed spec from the previous PR. One reader, tryGetTypedValue, now serves datetimes, durations and points, so the node and edge loops each drop their two copies of the datetime and duration code. A point is read by building a map from the JSON object and calling Point::fromMap, so the rules are exactly point()'s. A JSON null leaves the property unset; an object naming no point, or holding a null, is a NON_POINT_VALUE import error.

Where to look.

  • import/jsonl/JsonlParser.cpp:234 tryGetTypedValue: one dispatch for every typed property
  • import/jsonl/JsonlParser.cpp:185 tryGetPoint
  • query/parser/CypherGrammarQueries.cpp:575: the POINTS clause

Evidence

  • Before: WITH POINTS is a syntax error.
    After:
    test_query_ir_load_jsonl_point   [  PASSED  ] 8 tests.
    JSONL and parser suites          12/12 passed
    RejectsANameGivenTwoTypes: "Property 'at' is named both a datetime and a point."
    StillReadsPointsAsAnIdentifier: WITH 1 AS points RETURN points -> 1
    

Merge Danger

Door: two-way

Blast Radius: import

POINTS becomes a keyword. It stays usable as a name, as DURATIONS does.

@rjb32
rjb32 added this pull request to stack #1347 November 5, 2026 22:38
@rjb32
rjb32 force-pushed the remyboutonnet/tur-302-4-typed-property-spec branch from 1ab0400 to da15148 Compare November 6, 2026 09:22
@rjb32
rjb32 force-pushed the remyboutonnet/tur-302-5-jsonl-points branch from 850cba8 to 9eea358 Compare November 6, 2026 09:22
@rjb32
rjb32 force-pushed the remyboutonnet/tur-302-4-typed-property-spec branch from da15148 to 8649556 Compare November 6, 2026 15:59
@rjb32
rjb32 force-pushed the remyboutonnet/tur-302-5-jsonl-points branch from 9eea358 to 66ba204 Compare November 6, 2026 15:59
@rjb32
rjb32 force-pushed the remyboutonnet/tur-302-5-jsonl-points branch from 66ba204 to ea926ef Compare November 6, 2026 19:19
@rjb32
rjb32 force-pushed the remyboutonnet/tur-302-4-typed-property-spec branch from 8649556 to 1ada68f 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-4-typed-property-spec to main November 6, 2026 19:37
@rjb32
rjb32 merged commit ea926ef into main Nov 6, 2026
4 checks passed
@rjb32
rjb32 deleted the remyboutonnet/tur-302-5-jsonl-points 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