Is it possible to apply `by` modulator to not last step?

I have TheCrew graph. I'm trying to get 2 properties and unfold values only for second one, query is like g.V().valueMap("location", "name").by(__.unfold()).by() but property order after valueMap can be random, so I added sorting to get expected result g.V().valueMap("location", "name").order(local).by(keys) Is it possible to add by modulator after sorting to valueMap maps? g.V().valueMap("location", "name").order(local).by(keys).by(__.unfold()).by() get error because try to apply all by to order step
5 Replies
spmallette
spmallette16mo ago
property order after valueMap can be random
by() is order dependent to the specification of the property keys in valueMap(). the first by() must always apply to "location" and the second by() must always apply to the "name".
Valentyn Kahamlyk
gremlin> g.V(1).valueMap("location", "name").by(__.unfold()).by() ==>[name:marko,location:[san diego,santa cruz,brussels,santa fe]]
spmallette
spmallette16mo ago
strange. i feel like something must be broken wonder how long that's been misbehaving tests must have been passing by accident all this time. or do we not test that?
Valentyn Kahamlyk
Current implementation return properties in order by addition. Cole's shuffle tests found this issue
spmallette
spmallette16mo ago
hmmm - i wonder if graphs are returning properties in the way this shuffle is forcing? i'd assume we'd have run into this before otherwise. it seems that there is a bug in this behavior https://issues.apache.org/jira/browse/TINKERPOP-2974
Want results from more Discord servers?
Add your server