You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Boxuan Li (Jira)" <ji...@apache.org> on 2022/05/04 16:35:00 UTC

[jira] [Comment Edited] (TINKERPOP-2739) ComputerGraph filters out computed properties in keys() and properties() methods

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

Boxuan Li edited comment on TINKERPOP-2739 at 5/4/22 4:34 PM:
--------------------------------------------------------------

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 (e.g. g_V_both_properties_dedup_count in DedupTest) fail after the fix.


was (Author: li-boxuan):
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)