You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
OffsetDateTime silently dropped on write (not registered in the type system) - blocks native Bolt datetime writes #4922
A java.time.OffsetDateTime value is silently dropped when written to a schemaless property. The type system does not recognize OffsetDateTime, so Type.getTypeByValue(offsetDateTime) returns null and the serializer stores nothing - the property comes back as null on read, with no error.
finalMutableDocumentdoc = db.newDocument("Ev");
doc.set("ts", OffsetDateTime.now()); // silently lostdoc.save();
// SELECT ts FROM Ev -> ts is null
Why it matters (Bolt / graphiti)
The Neo4j Bolt drivers pack a fixed-offset/UTC datetime (e.g. Python's datetime.now(timezone.utc)) as an offset DateTime PackStream struct, which ArcadeDB decodes (#4905) to a java.time.OffsetDateTime. So every native datetime a graphiti-style client writes over Bolt is currently dropped once it stops sending ISO strings. This blocks the native-datetime write path enabled by #4905 / #4907.
Root cause
OffsetDateTime is registered nowhere in the temporal-type plumbing, even though its siblings are:
Type.TYPES_BY_USERTYPE maps Date / Calendar / LocalDateTime / ZonedDateTime / Instant to DATETIME, but not OffsetDateTime.
BinaryTypes.getTypeFromValue() has instanceof branches for LocalDateTime / ZonedDateTime / Instant / LocalDate / Date / Calendar, but not OffsetDateTime, so it falls through and the value is not serialized as a datetime.
DateUtils.dateTimeToTimestamp() already handles OffsetDateTime (and isDate() includes it), so only the type-resolution layer is missing.
Fix
Register OffsetDateTime alongside the other temporal types:
add it to TYPES_BY_USERTYPE -> DATETIME,
add it to the allowAssignmentFrom of DATETIME / DATETIME_MICROS / DATETIME_NANOS / DATETIME_SECOND,
add an OffsetDateTime branch to BinaryTypes.getTypeFromValue() (mirroring ZonedDateTime).
Storage normalizes to an instant as it does for ZonedDateTime (zone/offset not preserved; instant is). Comparisons still work because a stored datetime read back as LocalDateTime is treated as UTC by CypherDateTime.compareTo.
Test plan
Engine: Type.getTypeByValue(OffsetDateTime) resolves to DATETIME; an OffsetDateTime written to a schemaless property is persisted with the instant preserved.
Bolt IT: a native offset datetime sent as a query parameter is stored and read back (previously null).
Activity
fix(#4922): register OffsetDateTime as a storable DATETIME type (#4923)
feat: handle java.time.OffsetDateTime in converter and columnar trans…
Update Python bindings: bulk-transport perf, embedded-only packaging,…
Update Python bindings: bulk-transport perf, embedded-only packaging,…
Update Python bindings: bulk-transport perf, embedded-only packaging,…
Update Python bindings: bulk-transport perf, embedded-only packaging,…
Update Python bindings: bulk-transport perf, embedded-only packaging,…
fix(#4922): register OffsetDateTime as a storable DATETIME type (#4923)