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

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

Github user okram commented on a diff in the pull request:

    https://github.com/apache/tinkerpop/pull/446#discussion_r89875173
  
    --- Diff: 
gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyValueMapTest.groovy
 ---
    @@ -42,5 +42,10 @@ public abstract class GroovyValueMapTest {
             public Traversal<Vertex, Map<String, List<String>>> 
get_g_VX1X_outXcreatedX_valueMap(final Object v1Id) {
                 new ScriptTraversal<>(g, "gremlin-groovy", 
"g.V(v1Id).out('created').valueMap", "v1Id", v1Id)
             }
    +        
    +        @Override
    +        public Traversal<Vertex, Map<Object, Object>> 
get_g_V_valueMapToken() {
    --- End diff --
    
    This method is named wrong, it should be:
    
    ```
    get_g_V_hasLabelXpersonX_filterXoutEXcreatedXX_valueMapXtrueX()
    ```


> PropertyMapStep returns Map<String,E> but puts non String keys in it!
> ---------------------------------------------------------------------
>
>                 Key: TINKERPOP-1483
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1483
>             Project: TinkerPop
>          Issue Type: Bug
>          Components: process
>    Affects Versions: 3.2.2
>            Reporter: JP Moresmau
>
> PropertyMapStep.map has return type Map<String,E>, but if includeTokens is 
> true:
> {code}
> if (element instanceof VertexProperty) {
>                     map.put(T.id, element.id());
>                     map.put(T.key, ((VertexProperty) element).key());
>                     map.put(T.value, ((VertexProperty) element).value());
>                 } else {
>                     map.put(T.id, element.id());
>                     map.put(T.label, element.label());
>                 }
> {code}
> T.id, T.key and T.value are NOT strings, so code looping through the keys in 
> Java fails. toString() are missing... But do we rely on having these keys in 
> other operations?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to