This is an automated email from the ASF dual-hosted git repository.
spmallette pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
The following commit(s) were added to refs/heads/master by this push:
new 1b2378eea4 Clarify dateAdd() semantics for DT tokens and value bounds
1b2378eea4 is described below
commit 1b2378eea4673624022d2cfa1e4eb722c679c244
Author: Stephen Mallette <[email protected]>
AuthorDate: Fri Sep 11 16:09:39 2026 +0000
Clarify dateAdd() semantics for DT tokens and value bounds
Document that DT is a closed enumeration whose only members are second,
minute, hour, and day, and that supplying a token outside that set raises
an Argument Error. Also note that value is bounded by the INT type, so the
duration is derived without numeric overflow even for large magnitudes.
Assisted-by: Kiro:claude-opus-4.8
---
docs/src/dev/provider/gremlin-semantics.asciidoc | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/docs/src/dev/provider/gremlin-semantics.asciidoc
b/docs/src/dev/provider/gremlin-semantics.asciidoc
index 18034f9e4a..fbf6747f68 100644
--- a/docs/src/dev/provider/gremlin-semantics.asciidoc
+++ b/docs/src/dev/provider/gremlin-semantics.asciidoc
@@ -1520,11 +1520,14 @@ None
*Considerations:*
The step computes a duration from `dateToken` and `value` at step construction
time and adds that duration to
-the incoming date.
+the incoming date. `DT` is a closed enumeration whose only members are
`second`, `minute`, `hour`, and `day`, and
+`dateToken` must name one of them. The `value` is bounded by the `INT` type,
so the duration is derived without
+numeric overflow even for large magnitudes.
*Exceptions:*
* If the incoming traverser is a non-`DATETIME` value then an `Argument Error`
is raised.
+* If `dateToken` is not one of the supported `DT` members (`second`, `minute`,
`hour`, `day`) then an `Argument Error` is raised.
See:
link:https://github.com/apache/tinkerpop/tree/x.y.z/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/DateAddStep.java[source],
link:https://tinkerpop.apache.org/docs/x.y.z/reference/#dateAdd-step[reference]