You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Guobao Chen (Jira)" <ji...@apache.org> on 2021/03/23 06:21:00 UTC
[jira] [Commented] (TINKERPOP-2540) Unexpected count() step result
[ https://issues.apache.org/jira/browse/TINKERPOP-2540?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17306794#comment-17306794 ]
Guobao Chen commented on TINKERPOP-2540:
----------------------------------------
Seems this issue is related to or step and count step.
Following script returns expected result (without or):
{code:java}
gremlin> g.V().hasLabel('person').has('name','testuser1').has('name','testuser1').values('name','age').dedup().count()
==>0{code}
Also following script returns expected result (with or step but without count step):
{code:java}
gremlin> g.V().hasLabel('person').has('name','testuser1').or().has('name','testuser1').values('name','age').dedup()
gremlin> {code}
> Unexpected count() step result
> ------------------------------
>
> Key: TINKERPOP-2540
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2540
> Project: TinkerPop
> Issue Type: Bug
> Components: process
> Affects Versions: 3.4.10
> Environment: OS: Ubuntu 20.04.2 LTS
> Java: Java(TM) SE Runtime Environment (build 1.8.0_241-b07)
> Reporter: Guobao Chen
> Priority: Major
>
> After installing latest (tinkerpop version 3.4.10), it's found that running a specific gremlin script with 'count()' step gives unexpected result.
> *Steps to reproduce*
> 1 Install tinkerpop 3.4.10, and connect to this server with gremlin console client
> 2 create a modern graph with TinkerFactory
> {code:java}
> gremlin> graph = TinkerFactory.createModern()
> ==>tinkergraph[vertices:6 edges:6]{code}
> 3 query with following script in the result
> {code:java}
> gremlin> g.V().hasLabel('person').has('name','testuser1').or().has('name','testuser1').values('name','age').dedup().count()
> {code}
> Note that usser with name 'testuser1' doesn't exist in the created 'modern' graph.
> *Expected result*
> a numeric number showing the count (or 0 if there is no vertices from previous steps before count() step)
> *Actual result*
> See a list of vertices:
> {code:java}
> gremlin> g.V().hasLabel('person').has('name','testuser1').or().has('name','testuser1').values('name','age').dedup().count()
> ==>v[1]
> ==>v[2]
> ==>v[3]
> ==>v[4]
> ==>v[5]
> ==>v[6]{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)