You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2024/06/17 17:40:00 UTC

[jira] [Commented] (TINKERPOP-3080) AggregateStep can support all Operators predefined in TinkerPop

    [ https://issues.apache.org/jira/browse/TINKERPOP-3080?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17855680#comment-17855680 ] 

ASF GitHub Bot commented on TINKERPOP-3080:
-------------------------------------------

rdtr commented on code in PR #2616:
URL: https://github.com/apache/tinkerpop/pull/2616#discussion_r1643180225


##########
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/AggregateGlobalStep.java:
##########
@@ -122,8 +121,16 @@ protected Traverser.Admin<S> processNextStart() {
 
     @Override
     public void processAllStarts() {
+        final TraversalSideEffects sideEffects = this.getTraversal().getSideEffects();
+
+        // Pre-defined Operator such as addAll and assign will reduce over the whole input set, rather than
+        // applying a single input one by one.
+        final boolean isOperatorForBulkSet = sideEffects.getReducer(sideEffectKey) == Operator.addAll ||

Review Comment:
   thanks, renamed it





> AggregateStep can support all Operators predefined in TinkerPop
> ---------------------------------------------------------------
>
>                 Key: TINKERPOP-3080
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-3080
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: language, process
>            Reporter: Norio Akagi
>            Priority: Major
>             Fix For: 3.7.3
>
>
> Currently, {{AggreteGlobalStep}} and {{AggreteLocalStep}} only support addAll and assign as Operator. This is because they use BulkSet to apply to Operator. Only addAll and assign can work with BulkSet, so for other operators it results in a type casting failure.
> They can be more flexible to work with any operators depending on what is set by {{{}withSideEffect(){}}}.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)