Hi Steve, Sorry, we are pretty busy with the release of v 3.0.0, I'll try to follow up as soon as I can.
The traverse() executor is still there, but only in the old SQL executor. The new parser (strict SQL) was implemented for the new executor, so it doesn't make much sense to have it in the parser without implementing it in the new executor. I have to say that in general we don't like the traverse() operator syntax much, and now we have many alternatives like TRAVERSE and MATCH queries that are supposed to do the same thing, so adding complexity re-introducing a legacy behavior does not sound a very good choice. To be honest, since we switched on the strictSQL option by default (more than two years ago), it's maybe the second time we have an explicit request for the traverse() operator, and in both cases it was for a migration from previous versions, so I'm pretty confident that we can cover your use case what we have, with better performance and a more elegant way. I'll keep you posted Thanks Luigi 2018-03-26 15:52 GMT+02:00 Steven Tomer <[email protected]>: > Luigi, > > I haven't heard back on this. > > Since the backend to the traverse() is still there, we're wondering how > much trouble it would be to add it into the new parser. > > It definitely has some powerful and unique use cases. If these aren't > covered by the new match projection, I would suggest that it should live on > to cover them. > > Thanks, > > Steve > > On Tue, Mar 20, 2018, 9:37 AM Steven Tomer <[email protected]> wrote: > >> Thanks so much! >> >> Steve >> >> On Tue, Mar 20, 2018 at 9:34 AM, Luigi Dell'Aquila < >> [email protected]> wrote: >> >>> Hi Steve, >>> >>> Thank you very much, I'll check it asap. >>> There is a way to re-enable the old traverse, you have to disable strict >>> SQL parsing: >>> >>> ALTER DATABASE CUSTOM strictSQL=false >>> >>> Anyway, I wouldn't recommend it in the long run, as you will lose a lot >>> of stability in SQL parsing >>> >>> I'll give you a feedback asap about the query >>> >>> Thanks >>> >>> Luigi >>> >>> 2018-03-20 16:30 GMT+01:00 Steven Tomer <[email protected]>: >>> >>>> Luigi, >>>> >>>> I've zipped up the dataset I've been using and am attaching it here. >>>> >>>> We really need a way to do queries like this. Is there any chance we >>>> can re-enable the old traverse() operator? >>>> >>>> Thanks, >>>> >>>> Steve >>>> >>>> On Tue, Mar 13, 2018 at 9:08 AM, Luigi Dell'Aquila < >>>> [email protected]> wrote: >>>> >>>>> Hi Steve, >>>>> >>>>> ah, got it, the old traverse() stopped when it found duplicates, while >>>>> the MATCH doesn't. >>>>> >>>>> Do you have a dataset I can check, so that I can try it and give you >>>>> better help? >>>>> >>>>> Thanks >>>>> >>>>> Luigi >>>>> >>>>> >>>>> >>>>> 2018-03-13 16:03 GMT+01:00 Steven Tomer <[email protected]>: >>>>> >>>>>> Luigi, >>>>>> >>>>>> That query never returns (looks like it goes into an infinite loop). >>>>>> >>>>>> I had to kill the server process to make it stop. >>>>>> >>>>>> Any other ideas? >>>>>> >>>>>> Steve >>>>>> >>>>>> On Tue, Mar 13, 2018 at 8:16 AM, Luigi Dell'Aquila < >>>>>> [email protected]> wrote: >>>>>> >>>>>>> Hi Steve, >>>>>>> >>>>>>> Try this >>>>>>> >>>>>>> SELECT expand(person) FROM ( >>>>>>> MATCH {class: Person, as: person, where: (givenname = >>>>>>> 'William')}.in(){while: ($depth = 0 OR givenname != 'George'), where: >>>>>>> (givenname = 'George')} RETURN person >>>>>>> ) >>>>>>> >>>>>>> The $depth = 0 guarantees that you don't stop traversing >>>>>>> immediately; the givenname != 'George' just stops traversing as >>>>>>> soon as you find a "George", I guess it is what you want (you don't need >>>>>>> duplicates) >>>>>>> >>>>>>> Thanks >>>>>>> >>>>>>> Luigi >>>>>>> >>>>>>> 2018-03-13 14:52 GMT+01:00 Steven Tomer <[email protected]>: >>>>>>> >>>>>>>> Hello Luigi, >>>>>>>> >>>>>>>> That's sad news indeed. It will require a major task to rip out >>>>>>>> all of the places we're using traverse(). >>>>>>>> >>>>>>>> I've been playing around with the MATCH operator, and I can't get >>>>>>>> it to model the former query: >>>>>>>> >>>>>>>> SELECT FROM Person WHERE givenname = 'William' and in >>>>>>>> traverse(0,-1,'in') ( givenname = 'George' ) >>>>>>>> >>>>>>>> I've tried: >>>>>>>> >>>>>>>> MATCH {class: Person, as: person, where: (givenname = >>>>>>>> 'William')}.in(){while: ($depth > 0), where: (givenname = 'George')} >>>>>>>> RETURN >>>>>>>> person >>>>>>>> MATCH {class: Person, as: person, where: (givenname = >>>>>>>> 'William')}.in('in'){while: ($depth > 0), where: (givenname = >>>>>>>> 'George')} >>>>>>>> RETURN person >>>>>>>> MATCH {class: Person, as: person, where: (givenname = >>>>>>>> 'William')}.in('MyEdge'){while: ($depth > 0), where: (givenname = >>>>>>>> 'George')} RETURN person >>>>>>>> >>>>>>>> None of your examples have an intermediary 'edge' type between >>>>>>>> them. We have Person -> MyEdge -> Person -> MyEdge -> Person. The >>>>>>>> traverse >>>>>>>> operator lets me hop over the edges. How do you do it with MATCH? >>>>>>>> >>>>>>>> Steve >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> On Tue, Mar 13, 2018 at 2:07 AM, Luigi Dell'Aquila < >>>>>>>> [email protected]> wrote: >>>>>>>> >>>>>>>>> Hi Steven, >>>>>>>>> >>>>>>>>> The traverse() operator was deprecated long time ago and is not >>>>>>>>> fully supported anymore. >>>>>>>>> I strongly suggest you to use TRAVERSE queries ( >>>>>>>>> https://orientdb.com/docs/2.2.x/SQL-Traverse.html) or even better >>>>>>>>> MATCH queries (https://orientdb.com/docs/2.2.x/SQL-Match.html) >>>>>>>>> >>>>>>>>> Another thing: if you are migrating now, you could probably >>>>>>>>> consider v 3.0 (see https://orientdb.com/orientdb-labs/), the >>>>>>>>> final GA will be released this week >>>>>>>>> >>>>>>>>> Thanks >>>>>>>>> >>>>>>>>> Luigi >>>>>>>>> >>>>>>>>> >>>>>>>>> 2018-03-12 23:00 GMT+01:00 StevenTomer <[email protected]>: >>>>>>>>> >>>>>>>>>> Hello, >>>>>>>>>> >>>>>>>>>> I'm using OrientDB 2.2.32. We're updating our software from >>>>>>>>>> 2.0.8. >>>>>>>>>> >>>>>>>>>> The traverse() operator in selects does not appear to be working. >>>>>>>>>> >>>>>>>>>> When I run the attached program, I get a com.orientechnologies. >>>>>>>>>> orient.core.sql.OCommandSQLParsingException. >>>>>>>>>> >>>>>>>>>> Exception in thread "main" >>>>>>>>>> com.orientechnologies.orient.core.sql.OCommandSQLParsingException: >>>>>>>>>> Error parsing query: >>>>>>>>>> SELECT FROM Person WHERE givenname = 'William' and in >>>>>>>>>> traverse(0,-1,'in') ( givenname = 'George' ) >>>>>>>>>> ^ >>>>>>>>>> Encountered "" at line 1, column 52. >>>>>>>>>> Was expecting one of: >>>>>>>>>> >>>>>>>>>> DB name="familytree" >>>>>>>>>> >>>>>>>>>> I hope it hasn't been removed. We use both the TRAVERSE FROM and >>>>>>>>>> SELECT FROM WHERE traverse() extensively. >>>>>>>>>> >>>>>>>>>> TRAVERSE FROM is wonderful for gathering a group of records from >>>>>>>>>> a given point. >>>>>>>>>> The traverse() operator is wonderful for queries like the above >>>>>>>>>> (return all people named William >>>>>>>>>> descended from a person named George. >>>>>>>>>> >>>>>>>>>> We really need both. >>>>>>>>>> >>>>>>>>>> Thanks, >>>>>>>>>> >>>>>>>>>> Steven Tomer >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> >>>>>>>>>> --- >>>>>>>>>> You received this message because you are subscribed to the >>>>>>>>>> Google Groups "OrientDB" group. >>>>>>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>>>>>> send an email to [email protected]. >>>>>>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> >>>>>>>>> --- >>>>>>>>> You received this message because you are subscribed to a topic in >>>>>>>>> the Google Groups "OrientDB" group. >>>>>>>>> To unsubscribe from this topic, visit https://groups.google.com/d/ >>>>>>>>> topic/orient-database/ic5UE-kyi-w/unsubscribe. >>>>>>>>> To unsubscribe from this group and all its topics, send an email >>>>>>>>> to [email protected]. >>>>>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> >>>>>>>> --- >>>>>>>> You received this message because you are subscribed to the Google >>>>>>>> Groups "OrientDB" group. >>>>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>>>> send an email to [email protected]. >>>>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>>>> >>>>>>> >>>>>>> -- >>>>>>> >>>>>>> --- >>>>>>> You received this message because you are subscribed to a topic in >>>>>>> the Google Groups "OrientDB" group. >>>>>>> To unsubscribe from this topic, visit https://groups.google.com/d/ >>>>>>> topic/orient-database/ic5UE-kyi-w/unsubscribe. >>>>>>> To unsubscribe from this group and all its topics, send an email to >>>>>>> [email protected]. >>>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>>> >>>>>> >>>>>> -- >>>>>> >>>>>> --- >>>>>> You received this message because you are subscribed to the Google >>>>>> Groups "OrientDB" group. >>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>> send an email to [email protected]. >>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>> >>>>> >>>>> -- >>>>> >>>>> --- >>>>> You received this message because you are subscribed to a topic in the >>>>> Google Groups "OrientDB" group. >>>>> To unsubscribe from this topic, visit https://groups.google.com/d/ >>>>> topic/orient-database/ic5UE-kyi-w/unsubscribe. >>>>> To unsubscribe from this group and all its topics, send an email to >>>>> [email protected]. >>>>> For more options, visit https://groups.google.com/d/optout. >>>>> >>>> >>>> -- >>>> >>>> --- >>>> You received this message because you are subscribed to the Google >>>> Groups "OrientDB" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> -- >>> >>> --- >>> You received this message because you are subscribed to a topic in the >>> Google Groups "OrientDB" group. >>> To unsubscribe from this topic, visit https://groups.google.com/d/ >>> topic/orient-database/ic5UE-kyi-w/unsubscribe. >>> To unsubscribe from this group and all its topics, send an email to >>> [email protected]. >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> -- > > --- > You received this message because you are subscribed to the Google Groups > "OrientDB" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
