You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Stephen Mallette (Jira)" <ji...@apache.org> on 2021/06/02 12:46:00 UTC

[jira] [Commented] (TINKERPOP-2549) Result set including Chinese characters out of order from gremlin-python client

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

Stephen Mallette commented on TINKERPOP-2549:
---------------------------------------------

As I look at this issue again, it's worth noting that Gremlin does not guarantee order so technically there is nothing particularly wrong with your result given that your traversal does not enforce {{order()}} explicitly. Of course, Gremlin wouldn't let you {{order()}} those results explicitly at this time I don't think because they are of mixed types (integer and string). If you need to hold your pairs together to form a bit of order then you would need to do something like:

{code}
gremlin> g.V().map(values('name','age').fold())
==>[marko,29]
==>[vadas,27]
==>[lop]
==>[josh,32]
==>[ripple]
==>[peter,35]
{code}

Please let me know if I am missing something else here that makes this a bug, otherwise I expect I will close this one as not being a problem. Thanks.



> Result set including Chinese characters out of order from gremlin-python client
> -------------------------------------------------------------------------------
>
>                 Key: TINKERPOP-2549
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2549
>             Project: TinkerPop
>          Issue Type: Bug
>          Components: python
>    Affects Versions: 3.4.6
>            Reporter: aqiang ji
>            Priority: Major
>
> Below python script print the result set out of order
>  
> {code:java}
> g = traversal().withRemote(
>     DriverRemoteConnection('ws://127.0.0.1:8182/gremlin', 'gmodern', username='admin', password='admin'))
> persons = g.V().hasLabel('person').values('name', 'age').toList();
> print(persons)
> {code}
> Result:
>  
> {code:java}
> ['marko', 29, 'vadas', 27, 'josh', 32, 'peter', 35, '王菲', 30, 30, 30, '李希希', '张飞']
> {code}
> Seems if there are Chinese characters in the vertex property, the result will be out of order. 
> The issue is not present from the java client.
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)