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
* Added `auth` module in `gremlin-python` for pluggable authentication.
66
66
* Fixed `GremlinLangScriptEngine` handling for some strategies.
67
67
* Updated Docker test suite set-up in `gremlin-python` to work with HTTP driver/server.
68
-
* Added `DateTime` serializer for Java and Python according for GraphBinaryV4.
69
-
* Replaced `Date` with `OffsetDateTime` in Java core.
68
+
* Updated `DateTime` serializers for Java and Python according to GraphBinaryV4.
70
69
* Defined GraphBinaryV4 specification.
71
70
* Defined GraphSONV4 specification.
72
71
* Update serializers for `label` of an `Element` as a singleton list of string for GraphBinaryV4.
@@ -119,6 +118,8 @@ This release also includes changes from <<release-3-7-XXX, 3.7.XXX>>.
119
118
* Fixed bug in `group()` value traversal of the second `by()` where a `CollectingBarrierStep` could produce an unexpected filtering effect when `ReducingBarrierStep` or `SupplyingBarrierStep` instances were not taken into account.
120
119
* Changed `DetachedFactory` to special case the handling of `ComputerAdjacentVertex` which doesn't carry properties but still needs to be detachable for OLAP cases.
121
120
* Deprecated `ProfilingAware.prepareForProfiling` method preferring to simply `resetBarrierFromValueTraversal` from the `Grouping` interface after strategy application.
121
+
* Deprecated `Date` in favor of `OffsetDateTime` as the default date type in core, `Date` is still supported as input to date steps for compatibility.
122
+
* Added and made `OffsetDateTime` serializers the default for existing date types in Python, Go, JavaScript, and .NET. `Date` is only used to deserialize from server.
122
123
* Added missing strategies in `gremlin-go`, updated certain strategies to take varargs and updated `GoTranslatorVisitor` for corresponding translations.
123
124
* Fixed `BigInt` and `BigDecimal` parsing in `gremlin-go` cucumber test suite, fixed `UnscaledValue` type in `BigDecimal` struct and added `ParseBigDecimal` method.
124
125
* Added validation to `groupCount()` to prevent an invalid usage of multiple `by()` modulators.
Copy file name to clipboardExpand all lines: docs/src/upgrade/release-3.8.x.asciidoc
+24-1Lines changed: 24 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,6 +30,17 @@ complete list of all the modifications that are part of this release.
30
30
31
31
=== Upgrading for Users
32
32
33
+
==== The Switch from Date to OffsetDateTime
34
+
The default implementation for date type in Gremlin is now changed from the `java.util.Date` to the more encompassing `java.time.OffsetDateTime`. This means the reference implementation for all date manipulation steps, `asDate()`, `dateAdd()`, and `dateDiff()`, as well as helper methods `datetime()`, will return `OffsetDateTime`, whose string representation will be in ISO 8601 format.
35
+
36
+
`Date` is still supported as incoming traverser results for these steps, as well as input into `dateDiff()` for compatibility purposes. All dates are assumed to be in `UTC` (given epoch time).
37
+
38
+
If one is using a persisted TinkerGraph that stored `Date` objects inside properties, one may notice `OffsetDateTime` being returned after traversal manipulation. The recommended solution is to update all existing `Date` objects into `OffsetDateTime`. This can be done by querying for the properties and transforming them using `asDate()`. Do note that all dates are assumed to be in `UTC` (given epoch time).
39
+
40
+
For Python, Go, JavaScript, and .NET GLVs, the existing date types are retained. The change is at the serialization level, where the exiting date type will be serialized as `OffsetDateTime` to the server, and both `Date` and `OffsetDateTime` from the server will be deserialized into the existing date types in the host language. As such, users of these GLVs should not notice impact to the application code. The caution remains in cases when client is accessing a database with `Date` object stored, the `Date` to `OffsetDateTime` transformations on the server assumes `UTC` timezone.
41
+
42
+
For Java GLV, this change would impact users who are expecting the old `Date` object from a traversal in their application, in this case the recommendation is to update code to expect `OffsetDateTime` as part of the version upgrade.
43
+
33
44
==== Simplification to g creation
34
45
The creation of "g" is the start point to writing Gremlin. There are a number of ways to create it, but TinkerPop has
35
46
long recommended the use of the anonymous `traversal()` function for this creation.
The default implementation for date type in Gremlin is now changed from the deprecated `java.util.Date` to the more encompassing `java.time.OffsetDateTime`. This means the reference implementation for all date manipulation steps, `asDate()`, `dateAdd()`, and `dateDiff()`, as well as helper methods `datetime()`, will return `OffsetDateTime`, whose string representation will be in ISO 8601 format.
300
+
301
+
`Date` is still supported as incoming traverser results for these steps, as well as input into `dateDiff()` for compatibility purposes. All dates are assumed to be in `UTC` (given epoch time).
302
+
303
+
This may impact providers who use TinkerGraph or whose implementation store dates as `java.util.Date`. While steps will support `Date`, all date manipulations will output `OffsetDateTime`. If a user had persisted `Date` objects in the database, upgrading to 3.8 may lead to the database having both types stored. It is recommended for users to perform transformation of `Date` to `OffsetDateTime` to retain consistency.
304
+
305
+
==== Graph Driver Providers
306
+
307
+
==== The Switch from Date to OffsetDateTime
308
+
The default implementation for date type in Gremlin is now changed from the deprecated `java.util.Date` to the more encompassing `java.time.OffsetDateTime`. This means the reference implementation for all date manipulation steps, `asDate()`, `dateAdd()`, and `dateDiff()`, as well as helper methods `datetime()`, will return `OffsetDateTime`, whose string representation will be in ISO 8601 format.
309
+
310
+
This means that drivers should use the extended `OffsetDateTime` type in the IO specs to serialize and deserialize native date objects.
Copy file name to clipboardExpand all lines: gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/translator/AnonymizedTranslatorVisitor.java
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@
23
23
24
24
importjava.math.BigDecimal;
25
25
importjava.math.BigInteger;
26
-
importjava.util.Date;
26
+
importjava.time.OffsetDateTime;
27
27
importjava.util.HashMap;
28
28
importjava.util.List;
29
29
importjava.util.Map;
@@ -167,7 +167,7 @@ public Void visitBooleanLiteral(final GremlinParser.BooleanLiteralContext ctx) {
Copy file name to clipboardExpand all lines: gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/translator/JavascriptTranslateVisitor.java
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -134,11 +134,11 @@ public Void visitMapKey(final GremlinParser.MapKeyContext ctx) {
0 commit comments