spmallette opened a new pull request, #3573:
URL: https://github.com/apache/tinkerpop/pull/3573

   The `count(local)` behavior in the Count Step section of the reference 
documentation was described only in an `IMPORTANT` prose callout, with no 
executable examples. The callout also omitted the `Path` case: it stated that a 
count of `1` is returned "for any other object," but `CountLocalStep` returns 
the path length for a `Path`.
   
   This change:
   
   - Removes the prose-only callout and repurposes its content as explanatory 
prose that correctly covers all object kinds the step handles: `Collection` 
(number of elements), `Map` (number of entries), `Path` (number of objects in 
the path), and any other object (`1`).
   - Adds a runnable example block against the modern graph so the 
per-object-kind counts render as live output at build time and are 
self-verifying:
     - `g.V().fold().count(local)` → `6` (Collection)
     - `g.V().group().by(label).count(local)` → `2` (Map)
     - `g.V(1).out().path().count(local)` → `2, 2, 2` (Path)
     - `g.V(1).count(local)` → `1` (any other object)
   - Cross-links the examples to `fold()`, `group()`, `path()`, and the path 
data structure so a reader can follow the behavior in context.
   
   The reference book builds and the count-step section reads coherently with 
the rendered live output matching the documented counts.


-- 
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]

Reply via email to