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

Boxuan Li commented on TINKERPOP-2739:
--------------------------------------

My proposed fix is to remove the filter step in 
[keys|https://github.com/apache/tinkerpop/blob/da1155f6f4474dc5d2378eebeeb18fe49f22cd37/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/util/ComputerGraph.java#L143-L146]
 and 
[properties|https://github.com/apache/tinkerpop/blob/da1155f6f4474dc5d2378eebeeb18fe49f22cd37/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/util/ComputerGraph.java#L170-L173]
 methods of ComputerElement class, but some tests fail after the fix. 

> ComputerGraph filters out computed properties in keys() and properties() 
> methods
> --------------------------------------------------------------------------------
>
>                 Key: TINKERPOP-2739
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2739
>             Project: TinkerPop
>          Issue Type: Bug
>            Reporter: Boxuan Li
>            Priority: Major
>
> In 
> [keys|https://github.com/apache/tinkerpop/blob/da1155f6f4474dc5d2378eebeeb18fe49f22cd37/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/util/ComputerGraph.java#L143-L146]
>  and 
> [properties|https://github.com/apache/tinkerpop/blob/da1155f6f4474dc5d2378eebeeb18fe49f22cd37/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/util/ComputerGraph.java#L170-L173]
>  methods of ComputerElement class, computed keys are filtered out. This 
> behaviour does not make sense to me. On the contrary, 
> [property|https://github.com/apache/tinkerpop/blob/da1155f6f4474dc5d2378eebeeb18fe49f22cd37/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/util/ComputerGraph.java#L148-L151]
>  method in the same class does not have this behaviour. This looks like a bug 
> to me because they are not supposed to have different behaviour.
> To see this contradiction, simply change 
> [this|https://github.com/apache/tinkerpop/blob/da1155f6f4474dc5d2378eebeeb18fe49f22cd37/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/ranking/pagerank/PageRankVertexProgram.java#L185]
>  line to:
> {code:java}
> edgeCount = (Double) vertex.values(EDGE_COUNT).next();
> {code}
> and then many tests will fail.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to