Map DateTime to google.protobuf.Timestamp and document temporal string formats#1306
Open
jwils wants to merge 2 commits into
Open
Map DateTime to google.protobuf.Timestamp and document temporal string formats#1306jwils wants to merge 2 commits into
jwils wants to merge 2 commits into
Conversation
jwils
requested review from
BrianSigafoos-SQ,
bsorbo,
ellisandrews-toast,
jwondrusch,
marcdaniels-toast,
myronmarston and
rossroberts-toast
as code owners
July 9, 2026 16:00
jwils
force-pushed
the
joshuaw/proto-field-numbers
branch
from
July 9, 2026 17:29
f62a859 to
90e2af5
Compare
jwils
force-pushed
the
joshuaw/proto-timestamp
branch
from
July 9, 2026 17:29
5a2e67d to
1537869
Compare
jwils
force-pushed
the
joshuaw/proto-field-numbers
branch
from
July 9, 2026 18:13
90e2af5 to
616dbfd
Compare
jwils
force-pushed
the
joshuaw/proto-timestamp
branch
2 times, most recently
from
July 10, 2026 15:44
721fe97 to
d516c31
Compare
jwils
force-pushed
the
joshuaw/proto-field-numbers
branch
from
July 10, 2026 15:44
616dbfd to
74011e5
Compare
jwils
force-pushed
the
joshuaw/proto-timestamp
branch
from
July 10, 2026 15:52
d516c31 to
9e7369b
Compare
jwils
force-pushed
the
joshuaw/proto-field-numbers
branch
from
July 11, 2026 13:34
74011e5 to
075e749
Compare
jwils
force-pushed
the
joshuaw/proto-timestamp
branch
from
July 11, 2026 13:36
9e7369b to
9e2b508
Compare
jwils
force-pushed
the
joshuaw/proto-field-numbers
branch
from
July 11, 2026 13:53
075e749 to
8d6e03f
Compare
jwils
force-pushed
the
joshuaw/proto-timestamp
branch
from
July 11, 2026 13:54
9e2b508 to
06e1531
Compare
jwils
force-pushed
the
joshuaw/proto-field-numbers
branch
from
July 11, 2026 13:59
8d6e03f to
0a476c1
Compare
jwils
force-pushed
the
joshuaw/proto-timestamp
branch
from
July 11, 2026 14:00
06e1531 to
ee20f41
Compare
jwils
force-pushed
the
joshuaw/proto-field-numbers
branch
from
July 15, 2026 23:52
5f292f5 to
7a57c87
Compare
jwils
force-pushed
the
joshuaw/proto-timestamp
branch
from
July 15, 2026 23:52
508c016 to
4a6aa37
Compare
jwils
force-pushed
the
joshuaw/proto-field-numbers
branch
from
July 16, 2026 14:21
7a57c87 to
26fe805
Compare
jwils
force-pushed
the
joshuaw/proto-timestamp
branch
from
July 16, 2026 14:21
4a6aa37 to
1aa384b
Compare
…g formats `DateTime` fields now use the well-known `google.protobuf.Timestamp` type (with `google/protobuf/timestamp.proto` imported automatically) instead of `string`. A Timestamp cannot be malformed the way a string can, and proto consumers get language-native timestamp types. Note that a Timestamp is a UTC instant, so a publisher's original UTC offset is not preserved; `t.protobuf type: "string"` remains available to override. To support this, `t.protobuf` gains two options usable by any scalar: - `import:` maps a scalar to an externally defined proto type, emitting the needed `import` statement in `schema.proto`. - `comment:` documents the expected format on each generated field, used by the built-in `string`-typed temporal scalars (`Date`, `LocalTime`, `TimeZone`) whose proto type is wider than the ElasticGraph type (e.g. `// ISO 8601 date`). Values are still validated at ingestion time, just as with JSON ingestion.
jwils
force-pushed
the
joshuaw/proto-field-numbers
branch
from
July 17, 2026 15:05
26fe805 to
8803f5e
Compare
jwils
force-pushed
the
joshuaw/proto-timestamp
branch
from
July 17, 2026 15:05
1aa384b to
b94fd0e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Mapping
DateTimetostringloses the type safety proto offers — a string can be malformed in ways agoogle.protobuf.Timestampcannot, and proto consumers get language-native timestamp types. For the remainingstring-typed temporal scalars, the proto type is much wider than the ElasticGraph type, so the expected format deserves documentation at the point of use (per review discussion).What
DateTimetogoogle.protobuf.Timestamp, importinggoogle/protobuf/timestamp.protoautomatically. ATimestampis a UTC instant, so a publisher's original UTC offset is not preserved;t.protobuf type: "string"remains available as an override.t.protobufgains two options usable by any scalar:import:maps a scalar to an externally defined proto type, emitting the neededimportstatementcomment:documents the expected format on each generated fieldstring-typed temporal scalars (Date,LocalTime,TimeZone) usecomment:to document their formats (e.g.// ISO 8601 date, e.g. "2024-11-25"). Values are still validated at ingestion time, exactly as with JSON ingestion.source name:comments and propagate to the innermost nested-list wrapper field.Risk Assessment
Low — only affects the unreleased
elasticgraph-proto_ingestionextension from #1080.References
Update — 2026-07-10
Nested-list wrapper comment propagation was removed after #1080 changed to reject lists of lists. Format comments continue to apply to supported scalar and single-list fields.