tinkerpop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spmallette (GitHub) <git...@apache.org>
Subject [GitHub] [tinkerpop] spmallette commented on issue #1095: Fix list deduplication for GraphSONV3d0 SetIO objectify
Date Wed, 10 Apr 2019 10:50:24 GMT
I had to do some more research on this. I suddenly didn't understand why the query in question:


from https://stackoverflow.com/q/55571767/1831717

produces a `Set` for `SetIO` to be the source of this problem. So I tested the traversal in
the Console:

gremlin> x = g.V().store('vertices').by(valueMap()).
......1>   outE().store('edges').by(valueMap()).
......2>   cap('vertices','edges').next()
==>vertices={{name=[marko], age=[29]}=1, {name=[vadas], age=[27]}=1, {name=[lop], lang=[java]}=1,
{name=[josh], age=[32]}=1, {name=[ripple], lang=[java]}=1, {name=[peter], age=[35]}=1}
==>edges={{weight=0.4}=2, {weight=0.5}=1, {weight=1.0}=2, {weight=0.2}=1}
gremlin> x.getClass()
==>class java.util.HashMap
gremlin> x.vertices.class
==>class org.apache.tinkerpop.gremlin.process.traversal.step.util.BulkSet
gremlin> x.vertices[0].getClass()
==>class java.util.HashMap
gremlin> x.vertices[0].age.class
==>class java.util.ArrayList

The only collection that is `Set` based is "vertices" and "edges" keys which are `BulkSet`.
The 3.3.x line of code does not have support for this `BulkSet` type - this was rectified
in 3.4.0:


So, technically the issue is resolved by 3.4.0+ but would require that you and Neptune both
use this newer version.  I did come up with a workaround if to transform the `BulkSet` with

gremlin> x = g.V().store('vertices').by(valueMap()).
......1>   outE().store('edges').by(valueMap()).
......2>   cap('vertices','edges').
......3>   select('vertices','edges').
......4>     by(unfold().fold()).toList()
gremlin> x.vertices.class
==>class java.util.ArrayList

I would think that this would work on 3.3.x without any changes.

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

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