LET clause stocking only last record. Bug or am i doing something wrong ?

Skip to first unread message

Mihai Pricop

Mar 20, 2015, 7:19:19 AM3/20/15
to orient-...@googlegroups.com

I am trying to use the LET clause to stock some information in an sub-query, keep the information relative to the record. After another select from the query where I save the variable, the variable holds the value only of the last record.

For example, a query over the GratefulDeadConcerts: 

select *,$u from (select from (select expand(both()) from #9:8 limit 10) let $u = $current.performances)

This results in:

#9:125V5coverHEY BO DIDDLEYsong[5][1][1][4]65
#9:5177V293coverGOING DOWN THE ROAD FEELING BADsong[39][1][1][46]65
#9:12167V312originalCASEY JONESsong[47][1][1][33]65
#9:17161V328originalSTELLA BLUEsong[31][1][1][46]65
#9:21237V241coverCOLD RAIN AND SNOWsong[56][1][1][59]65
#9:22225V332originalUNCLE JOHNS BANDsong[49][1][1][60]65
#9:2835V234originalMISSISSIPPI HALF-STEPsong[7][1][1][7]65
#9:29139V65originalHERE COMES SUNSHINEsong[34][1][1][32]65
The value of $u will always be 65 cause the last record has the performances value of 65. Why is this happening ?

I am running OrientDB v1.7.4. Hope someone can help me understand what is happening. If it is a bug of some sort, how can I go around it, and get my output ?

Mihai Pricop

Mar 23, 2015, 6:59:35 AM3/23/15
to orient-...@googlegroups.com
Noone can help me with this ?
Reply all
Reply to author
0 new messages