Skip to content

A ZONED_DATETIME sent over the gRPC wire arrives as a bare instant, so the zone that decides equality is lost and the value cannot be written back as a matching predicate #9969

Closed

Description

@ruispereira

Summary

ZONED_DATETIME compares by instant, then offset, then zone name, so two values at one instant in two
zones are two different values to the index, to a filter and to ORDER BY. The gRPC encoders convert a
ZonedDateTime to zdt.toInstant() and emit a proto Timestamp with logicalType "datetime", and the
decoder reads that back as an Instant, so a client reading a ZONED_DATETIME property over gRPC cannot
reconstruct the stored value or write a predicate that matches it. OFFSET_TIME and LOCAL_TIME have no
arm at all and fall through to the String.valueOf(o) fallback, so they arrive as a string_value with
no logical type while every other temporal arrives typed. The same question was answered for the JSON
path and for the Bolt wire, which carries the offset and even the zone id; the gRPC encoders have their
own dispatch and were part of neither change.

Where

grpcw/src/main/java/com/arcadedb/server/grpc/GrpcTypeConverter.java:186

if (o instanceof ZonedDateTime zdt) {
  final Instant instant = zdt.toInstant();
  return b.setTimestampValue(Timestamp.newBuilder().setSeconds(instant.getEpochSecond()).setNanos(instant.getNano()).build())
      .setLogicalType("datetime").build();
}

The same block, pasted, at grpcw/src/main/java/com/arcadedb/server/grpc/ArcadeDbGrpcService.java:5341
and grpc-client/src/main/java/com/arcadedb/remote/grpc/utils/ProtoUtils.java:307. The decode side is the
TIMESTAMP_VALUE arm of GrpcTypeConverter.fromGrpcValue, which returns
Instant.ofEpochSecond(ts.getSeconds(), ts.getNanos()). Record properties reach the encoder at
grpcw/src/main/java/com/arcadedb/server/grpc/GrpcVectorSearch.java:194.

Repro or evidence
Read of the three encoders and of the decoder, next to the two renderings that do keep the value:

Result.toJSON()                            : {"z":"2026-01-01T00:30+02:00","t":"00:30+02:00"}
BoltStructureMapper.toTemporalStructure(z) : DateTime struct with the offset, or the zone id for a named zone
GrpcTypeConverter.toGrpcValue(z)           : timestamp_value {seconds=1767220200} logicalType="datetime"
GrpcTypeConverter.toGrpcValue(t)           : string_value "00:30+02:00", no logical type

bolt/src/main/java/com/arcadedb/bolt/structure/BoltStructureMapper.java:481 is the arm that keeps it.

Suggested fix

Carry the zone on the wire rather than discarding it: emit a ZonedDateTime as its ISO text with a
logicalType "zoned_datetime" (the shape the JSON and HTTP surfaces already send), and give OffsetTime
and LocalTime their own arms with logicalType "offset_time" / "local_time" instead of the untyped
string fallback. Decode the three logical types back to the matching java.time value. The three copies
of this dispatch should call one encoder, so the next temporal type is added once; today a change has to
be made twice in the server module and once in the client.

Scope and confidence
Read of the three encoders, the decoder and the two correct renderers. The exposure is any client reading
a ZONED_DATETIME, OFFSET_TIME or LOCAL_TIME property over gRPC. Both types are recent, so this is
new code rather than a regression, but the wire reaches it today.

Activity

  1. added
    grpc
    severity:minor
    on Oct 13, 2026
  2. added this to the 26.11.1 milestone on Oct 14, 2026
  3. self-assigned this
    on Oct 14, 2026
  4. added
    in progress
    on Oct 14, 2026
  5. added a commit that references this issue on Oct 14, 2026
  6. robfrank commented on Oct 15, 2026

    @robfrank
    Collaborator

    Fixed in #10035. All five findings are fixed:

    • ZONED_DATETIME now crosses gRPC as ISO text tagged zoned_datetime, zone id included, instead of a bare instant.
    • OFFSET_TIME and LOCAL_TIME are tagged offset_time / local_time.
    • All three decode back to the matching java.time type, on the server and in the Java client.
    • The three encoder copies now share one codec.

    Note the wire change: a client that ignores logical_type now reads a string for ZONED_DATETIME where it used to read a timestamp.

    Still open: DURATION still travels as an untagged string; tracked in #10034.


    ❤️ Thanks for helping make ArcadeDB better! ArcadeDB is free and open source, sustained by its community. If it's useful to you or your company, please consider becoming a sponsor to keep development going.

  7. removed
    in progress
    on Oct 15, 2026
  8. added a commit that references this issue on Oct 21, 2026
  9. added a commit that references this issue on Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

buggrpcseverity:minor

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions