tinkerpop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dkuppitz (GitHub) <git...@apache.org>
Subject [GitHub] [tinkerpop] dkuppitz commented on issue #1266: TINKERPOP-2351 Fixed bug in Order when enum is a key in Map
Date Fri, 20 Mar 2020 02:51:08 GMT
My first thought was that the general rule rather be: If `a` and `b` have different (non-numeric)
types, use the `toString()` value for both, otherwise:

```
gremlin> g.V().map(properties().group().by(value).by(key()))
==>[29:age,marko:name]
==>[vadas:name,27:age]
==>[java:lang,lop:name]
==>[32:age,josh:name]
==>[java:lang,ripple:name]
==>[35:age,peter:name]
gremlin> g.V().map(properties().group().by(value).by(key)).order(local).by(keys, desc)
java.lang.String cannot be cast to java.lang.Integer
```

But then, taking Groovy as a reference, it probably shouldn't work this way.

```
gremlin> [id:'1','b':2,'z':3].sort()
==>b=2
==>id=1
==>z=3
gremlin> [id:'1','b':2,3:3].sort()
java.lang.String cannot be cast to java.lang.Integer
Type ':help' or ':h' for help.
Display stack trace? [yN]
```

Thus, +1 on that change.

[ Full content available at: https://github.com/apache/tinkerpop/pull/1266 ]
This message was relayed via gitbox.apache.org for dev@tinkerpop.apache.org

Mime
  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message