Cole-Greer opened a new pull request, #3371:
URL: https://github.com/apache/tinkerpop/pull/3371
This PR fixes several issues in the Go GLV related to GremlinLang arg
conversions and GraphBinary serialization/deserialization:
1. GraphBinary enum deserialization returns raw strings instead of typed
enums — `readEnum()` was returning plain strings for `T`, `Direction`, `Merge`,
and `GType` values. This caused map lookups using typed enum constants (e.g.,
`T.Id`) to fail because the deserialized keys were strings like `"id"` rather
than `t("id")`. The
fix passes the `dataType` into `readEnum()` and returns properly typed
values.
2. `VertexProperty` missing `Key` field on deserialization — When
deserializing a `VertexProperty` from GraphBinary, the `Key` field was not
being populated (only `Label` was set on the embedded `Element`). The fix sets
`Key` to the `label` value, matching the expected behavior.
3. `Datetime` serialization in `GremlinLang` lacks millisecond precision —
`time.Time` values were formatted using `time.RFC3339` (second precision),
producing strings like `"2021-01-01T09:30:00Z"`. Other GLVs use millisecond
precision. The fix switches to a custom format
(`2006-01-02T15:04:05.000Z07:00`) so datetimes always
include .000 milliseconds, ensuring consistency across language variants.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]