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/08/12 18:20:00 UTC

[jira] [Created] (TINKERPOP-2600) Can't order() a TraverserSet into a side-effect List

Stephen Mallette created TINKERPOP-2600:
-------------------------------------------

             Summary: Can't order() a TraverserSet into a side-effect List
                 Key: TINKERPOP-2600
                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2600
             Project: TinkerPop
          Issue Type: Bug
          Components: process
    Affects Versions: 3.4.12
            Reporter: Stephen Mallette


Not sure how big a problem this is but this comes from test suite:

{code}
gremlin> g.withSideEffect("a", [marko:["666"], noone:["blah"]]).V().group("a").by("name").by(__.outE().label().order().fold()).cap("a")
class java.util.ArrayList cannot be cast to class org.apache.tinkerpop.gremlin.process.traversal.traverser.util.TraverserSet (java.util.ArrayList is in module java.base of loader 'bootstrap'; org.apache.tinkerpop.gremlin.process.traversal.traverser.util.TraverserSet is in unnamed module of loader 'app')
Type ':help' or ':h' for help.
{code}

I was trying to add {{order()}} so that the test would work better in the gherkin suite when applied to graphs other than TinkerGraph when I came across this problem. I ended up having to post sort the result by deconstructing and reconstructing the {{Map}}:

{code}
gremlin> g.withSideEffect("a", [marko:["666"], noone:["blah"]]).V().group("a").by("name").by(__.outE().label().fold()).cap("a").
......1> unfold().group().by(keys).by(select(values).order().by(Order.asc).fold())
==>[ripple:[[]],peter:[[created]],noone:[[blah]],vadas:[[]],josh:[[created,created]],lop:[[]],marko:[[666,created,knows,knows]]]
{code}



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