Clarify group()-step callouts for non-productive key vs value projection#3572
Open
spmallette wants to merge 1 commit into
Open
Clarify group()-step callouts for non-productive key vs value projection#3572spmallette wants to merge 1 commit into
spmallette wants to merge 1 commit into
Conversation
The two group()-step examples that project 'age' as a key and then as a value were annotated with symmetric callouts, but their runtime behavior is asymmetric. A non-productive key-projection excludes the vertex from the result map entirely (no key is produced), while a non-productive value-projection retains the key with an empty value list. Reword the two callouts to describe each case accurately and contrast them. Assisted-by: Kiro:claude-opus-4.8
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3572 +/- ##
============================================
+ Coverage 76.35% 76.50% +0.14%
- Complexity 13424 14300 +876
============================================
Files 1012 1036 +24
Lines 60341 64608 +4267
Branches 7075 7661 +586
============================================
+ Hits 46076 49431 +3355
- Misses 11548 12088 +540
- Partials 2717 3089 +372 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The two
group()-step examples inreference/the-traversal.asciidocthat projectagefirst as a key and then as a value were annotated with symmetric callouts, both saying the non-productive entries are "filtered". Their runtime behavior is actually asymmetric:by('age').by('name')) drops the vertex from the result map entirely — no key is produced for vertices lacking anagevalue.by('name').by('age')) keeps the key (sincenameis productive for every vertex) but leaves its value list empty, e.g.ripple=[],lop=[].The old symmetric wording made the
{ripple:[], lop:[]}output surprising. This change rewrites callout<2>to explain that keys are retained with empty value lists, and updates callout<1>to state the entry is dropped entirely, drawing an explicit contrast between the two cases. Theproductivecross-reference is preserved.Only the two callouts changed; the example code lines are untouched and still render their live output at build time, which confirms the reworded prose matches what the reader sees.