You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2024/02/08 18:17:06 UTC

(tinkerpop) branch master updated (fae51e87e7 -> 55a7b7f256)

This is an automated email from the ASF dual-hosted git repository.

spmallette pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


    from fae51e87e7 Merge branch '3.7-dev'
     new c7f3d2454a Drop use of unmodifiable map in arity predictor CTR
     new d804e4a3b9 Merge branch '3.6-dev' into 3.7-dev
     new 55a7b7f256 Merge branch '3.7-dev'

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../strategy/util/StepOutputArityPredictor.java    | 24 +++++++++-------------
 1 file changed, 10 insertions(+), 14 deletions(-)


(tinkerpop) 02/03: Merge branch '3.6-dev' into 3.7-dev

Posted by sp...@apache.org.
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

commit d804e4a3b9d7d12c679e218abc24091453031467
Merge: 809a20986c c7f3d2454a
Author: Stephen Mallette <st...@amazon.com>
AuthorDate: Thu Feb 8 13:16:48 2024 -0500

    Merge branch '3.6-dev' into 3.7-dev

 .../strategy/util/StepOutputArityPredictor.java    | 24 +++++++++-------------
 1 file changed, 10 insertions(+), 14 deletions(-)


(tinkerpop) 01/03: Drop use of unmodifiable map in arity predictor CTR

Posted by sp...@apache.org.
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

commit c7f3d2454a654cea57c2a99077d859b115fec4c3
Author: Stephen Mallette <st...@amazon.com>
AuthorDate: Thu Feb 8 13:03:47 2024 -0500

    Drop use of unmodifiable map in arity predictor CTR
---
 .../strategy/util/StepOutputArityPredictor.java    | 24 +++++++++-------------
 1 file changed, 10 insertions(+), 14 deletions(-)

diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/util/StepOutputArityPredictor.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/util/StepOutputArityPredictor.java
index 1e0157bd51..136922a3a7 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/util/StepOutputArityPredictor.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/util/StepOutputArityPredictor.java
@@ -231,27 +231,23 @@ public class StepOutputArityPredictor {
     final private static Map<String, Function<Traversal, Arity>> SPECIAL_TRAVERSAL_TO_ARITY_FUNCTION_MAP;
 
     static {
-        final Map<String, Function<Step, Arity>> tempMap1 = new HashMap<>();
+        STEP_TO_ARITY_FUNCTION_MAP = new HashMap<>();
         for (Class elem : STEP_CLASSES_WITH_DEFINITELY_SINGULAR_ARITY_BEHAVIOR) {
-            tempMap1.put(elem.getSimpleName(), RETURN_DEFINITELY_SINGLE_ARITY_FOR_STEP_INPUT);
+            STEP_TO_ARITY_FUNCTION_MAP.put(elem.getSimpleName(), RETURN_DEFINITELY_SINGLE_ARITY_FOR_STEP_INPUT);
         }
 
         for (Class elem : STEP_CLASSES_WITH_OPTIONAL_SINGULAR_ARITY_BEHAVIOR) {
-            tempMap1.put(elem.getSimpleName(), RETURN_MAY_BE_SINGLE_ARITY_FOR_STEP_INPUT);
+            STEP_TO_ARITY_FUNCTION_MAP.put(elem.getSimpleName(), RETURN_MAY_BE_SINGLE_ARITY_FOR_STEP_INPUT);
         }
 
-        tempMap1.put(EdgeVertexStep.class.getSimpleName(), StepOutputArityPredictor::wouldEdgeVertexStepHaveSingleResult);
-        tempMap1.put(TraversalMapStep.class.getSimpleName(), StepOutputArityPredictor::getOutputArityBehaviorForTraversalMapStep);
+        STEP_TO_ARITY_FUNCTION_MAP.put(EdgeVertexStep.class.getSimpleName(), StepOutputArityPredictor::wouldEdgeVertexStepHaveSingleResult);
+        STEP_TO_ARITY_FUNCTION_MAP.put(TraversalMapStep.class.getSimpleName(), StepOutputArityPredictor::getOutputArityBehaviorForTraversalMapStep);
 
-        STEP_TO_ARITY_FUNCTION_MAP = Collections.unmodifiableMap(tempMap1);
-
-        final Map<String, Function<Traversal, Arity>> tempMap2 = new HashMap<>();
-        tempMap2.put(ValueTraversal.class.getSimpleName(), StepOutputArityPredictor::getOutputArityBehaviorForValueTraversal);
-        tempMap2.put(TokenTraversal.class.getSimpleName(), StepOutputArityPredictor::getOutputArityBehaviorForTokenTraversal);
-        tempMap2.put(IdentityTraversal.class.getSimpleName(), RETURN_DEFINITELY_SINGLE_ARITY_FOR_TRAVERSAL_INPUT);
-        tempMap2.put(ColumnTraversal.class.getSimpleName(), RETURN_DEFINITELY_SINGLE_ARITY_FOR_TRAVERSAL_INPUT);
-
-        SPECIAL_TRAVERSAL_TO_ARITY_FUNCTION_MAP = Collections.unmodifiableMap(tempMap2);
+        SPECIAL_TRAVERSAL_TO_ARITY_FUNCTION_MAP = new HashMap<>();
+        SPECIAL_TRAVERSAL_TO_ARITY_FUNCTION_MAP.put(ValueTraversal.class.getSimpleName(), StepOutputArityPredictor::getOutputArityBehaviorForValueTraversal);
+        SPECIAL_TRAVERSAL_TO_ARITY_FUNCTION_MAP.put(TokenTraversal.class.getSimpleName(), StepOutputArityPredictor::getOutputArityBehaviorForTokenTraversal);
+        SPECIAL_TRAVERSAL_TO_ARITY_FUNCTION_MAP.put(IdentityTraversal.class.getSimpleName(), RETURN_DEFINITELY_SINGLE_ARITY_FOR_TRAVERSAL_INPUT);
+        SPECIAL_TRAVERSAL_TO_ARITY_FUNCTION_MAP.put(ColumnTraversal.class.getSimpleName(), RETURN_DEFINITELY_SINGLE_ARITY_FOR_TRAVERSAL_INPUT);
     }
 
     private static Arity getStepOutputArity(final Step step, final Arity inputArity) {


(tinkerpop) 03/03: Merge branch '3.7-dev'

Posted by sp...@apache.org.
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

commit 55a7b7f25677c38ad23a813d19dfb58d69954d35
Merge: fae51e87e7 d804e4a3b9
Author: Stephen Mallette <st...@amazon.com>
AuthorDate: Thu Feb 8 13:16:55 2024 -0500

    Merge branch '3.7-dev'

 .../strategy/util/StepOutputArityPredictor.java    | 24 +++++++++-------------
 1 file changed, 10 insertions(+), 14 deletions(-)