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 6b805e04d2 Clarify aggregate() eager-barrier semantics in
gremlin-semantics
6b805e04d2 is described below
commit 6b805e04d2238ea5a7cfc90f19c51e13b4733343
Author: Stephen Mallette <[email protected]>
AuthorDate: Fri Sep 11 17:39:54 2026 +0000
Clarify aggregate() eager-barrier semantics in gremlin-semantics
Note in the aggregate() Considerations that the step is an eager barrier:
it collects all incoming objects into the side-effect before passing any
traverser downstream, so a later limit() or other short-circuiting step
does not reduce the aggregated collection. Also note that the aggregated
objects can be referenced by select(), where(), and math() through the
side-effect key, not only via cap().
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 1f7a80b96c..115a4b748d 100644
--- a/docs/src/dev/provider/gremlin-semantics.asciidoc
+++ b/docs/src/dev/provider/gremlin-semantics.asciidoc
@@ -748,7 +748,10 @@
link:https://tinkerpop.apache.org/docs/x.y.z/reference/#all-step[reference]
*Considerations:*
The `aggregate()` step is a side-effect step that collects objects but passes
the traverser to the next step unchanged.
-The aggregated objects can be accessed later using the `cap()` step.
+It is an eager barrier. All incoming objects are collected into the
side-effect before any traverser is passed to the
+next step, so a downstream `limit()` or other short-circuiting step does not
reduce the aggregated collection.
+The aggregated objects can be accessed later using the `cap()` step, and can
also be referenced by steps such as
+`select()`, `where()`, and `math()` through the side-effect key.
*Exceptions:*