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
spmallette11mo 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
spmallette11mo 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
spmallette11mo 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
More Posts
Complete Instruction Set?Hello there! I'm working on a gremlin to SQL implementation and was wondering if there is a specificBest Testing Practices?Hi! I'm using Gremlin for the 1st time in one of my projects and one of the goals is to do TDD. WhaRoute from origin to destination between two datetimesHey, I'm attempting to create a graph DB that will allow me to efficiently find a route from origin migrating from Azure Cosmos DB Gremlin to another Gremlin platform such as Google BigTableHas anyone tried, or have any idea if something like this is possible, thinking about potentially chWhat does Setting Write Buffer Watermark do?**int writeBufferHighWaterMark** If the number of bytes in the network send buffer exceeds this vHow can I filter by property typeSome time ago, we discovered that a certain timestamp property was being stored as a String instead Deleting X nodes when there is no incoming Y nodes to themHello, In my case, a `team` has many `Member` and each member works only for one company. a companyUser Defined Steps for orientDB Handlers (Server Plugins)OrientDB has Handlers (Server Plugins). Handlers allow writing custom functions. For example, there Modify traversal from outside the function that builds the traversal (Java)Hi peeps, more of an OOP oriented question this time around. I'll start off by explaining what I'm tHow can I write a project using an inject that doesn't exhaust itself?Take the following example query: g.inject("1", "2", "3").project("list").by(__.inject("b").fold()