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
See link:https://issues.apache.org/jira/browse/TINKERPOP-3115[TINKERPOP-3115] for more details.
73
+
33
74
==== The Switch from Date to OffsetDateTime
34
75
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
76
@@ -254,11 +295,6 @@ The GLVs will only support GraphBinary V4 and GraphSON support has been removed.
254
295
that was available in most GLVs has been removed. GraphBinary is a more compact format and has support for the same
255
296
types. This should lead to increased performance for users upgrading from any version of GraphSON to GraphBinary.
256
297
257
-
==== Improved handling of integer overflows
258
-
259
-
Integer overflows caused by addition and multiplication operations will throw an exception instead of being silently
260
-
skipped with incorrect result.
261
-
262
298
==== Gremlin Lang Float Literals Default to Double
263
299
264
300
The `GremlinLangScriptEngine` has been modified to treat float literals without explicit type suffixes (like 'm', 'f',
Previously, operations like sum or sack that involved mathematical calculations did not automatically promote the result
376
+
to a larger numeric type (e.g., from int to long) when needed. As a result, values could wrap around within their current
377
+
type, leading to unexpected behavior. This issue has now been resolved by enabling automatic type promotion for results.
378
+
379
+
Now, any mathematical operations such as Add, Sub, Mul, and Div will now automatically promote to the next numeric type
380
+
if an overflow is detected. For integers, the promotion sequence is: byte → short → int → long → overflow exception. For
381
+
floating-point numbers, the sequence is: float → double → infinity.
382
+
383
+
As a example the following query...
384
+
385
+
"""
386
+
g.withSack(32767s).inject(1s).sack(sum).sack()
387
+
"""
388
+
389
+
Before would return a short overflow exception or wrap to -1 depending on language, but now returns 32769i.
390
+
391
+
See link:https://issues.apache.org/jira/browse/TINKERPOP-3115[TINKERPOP-3115] for more details.
392
+
337
393
==== The Switch from Date to OffsetDateTime
338
394
339
395
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.
0 commit comments