Skip to content

TUR-302: Import: name the type of a property in one spec - #1336

Merged
rjb32 merged 4 commits into
mainfrom
remyboutonnet/tur-302-4-typed-property-spec
Nov 6, 2026
Merged

rjb32 merged 4 commits into
mainfrom
remyboutonnet/tur-302-4-typed-property-spec

Conversation

@rjb32

@rjb32 rjb32 commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Name the type of an imported property in one spec.

@rjb32

rjb32 commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

Note

AI-generated summary.

Summary

Goal. Before points could be imported, fold DateTimeSpec and DurationSpec into one spec. They were two identical name sets threaded side by side through about 25 files, and a third copy for points would have added a third parameter everywhere.

Approach. TypedPropertySpec maps a property name to the ValueType the import reads it as. WITH DATETIMES and WITH DURATIONS fill it, and the system ops carry one types dictionary of name to element type ({at = !storage.datetime}) in place of date_times and durations. A name given two types keeps the first and is recorded as a clash, which the analyzer rejects with the same message as before. LOAD syntax and behaviour are unchanged.

Where to look.

  • import/common/TypedPropertySpec.h:14: the spec and its clash record
  • query/analyzer/CypherAnalyzer.cpp:1897: clash and embedding checks over the one spec
  • query/ir/dialect/db/DBSystemOps.td:93: the types attribute
  • query/ir/exec/NLSystemTranslator.cpp:178 fillTypedPropertySpec
-importGraph(path, name, embeddings, dateTimes, durations)
+importGraph(path, name, embeddings, typedProperties)
-db.import_graph ... datetimes {at} durations {took}
+db.import_graph ... types {at = !storage.datetime, took = !storage.duration}

Evidence

  • Before: two spec classes and two attributes.
    After: no behaviour change.
    JSONL datetime, duration, clash, null, edge-endpoint tests; Parquet import and duration tests;
    parser keyword, edge-case and AST comparator tests; system import tests:  18/18 passed
    

Merge Danger

Door: two-way

Blast Radius: import

The IR attribute of db.import_graph and nl.import_graph is renamed. No stored data and no query syntax change.

@rjb32
rjb32 added this pull request to stack #1347 November 5, 2026 22:38
@rjb32
rjb32 force-pushed the remyboutonnet/tur-302-3-spatial-functions branch from e91050b to 9cf3554 Compare November 6, 2026 09:22
@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-3-spatial-functions branch from 9cf3554 to b03b1ba Compare November 6, 2026 15:59
@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-3-spatial-functions branch from b03b1ba to ad4bc29 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-3-spatial-functions to main November 6, 2026 19:37
@rjb32
rjb32 merged commit 1ada68f into main Nov 6, 2026
4 checks passed
@rjb32
rjb32 deleted the remyboutonnet/tur-302-4-typed-property-spec 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