You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Andrea C (Jira)" <ji...@apache.org> on 2025/03/07 00:29:00 UTC
[jira] [Commented] (TINKERPOP-3121) Multiple by() modulators lead to unexpected behavior
[ https://issues.apache.org/jira/browse/TINKERPOP-3121?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17933166#comment-17933166 ]
Andrea C commented on TINKERPOP-3121:
-------------------------------------
GroupCountStep only has one `keyTraversal` which is essentially replaced when multiple `by()` modulators are used. In the given example the output is determined by the last `by()` modulator.
A fix could involve changing GroupCountStep to use a `TraversalRing` for its `keyTraversal`, essentially supporting multiple `by()` modulators instead of just one.
> Multiple by() modulators lead to unexpected behavior
> ----------------------------------------------------
>
> Key: TINKERPOP-3121
> URL: https://issues.apache.org/jira/browse/TINKERPOP-3121
> Project: TinkerPop
> Issue Type: Improvement
> Components: process
> Affects Versions: 3.6.7
> Reporter: Stephen Mallette
> Priority: Minor
>
> {code}
> gremlin> g.V().out().groupCount().by('lang')
> ==>[java:4]
> gremlin> g.V().out().groupCount().by('lang').by('age')
> ==>[32:1,27:1]
> gremlin> g.V().out().groupCount().by('age')
> ==>[32:1,27:1]
> gremlin> g.V().out().groupCount().by('lang').by('age').by('lang')
> ==>[java:4]
> {code}
> This might be an issue for other steps beyond {{groupCount()}}.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)