simlaudato / asterixdb

Automatically exported from code.google.com/p/asterixdb
0 stars 0 forks source link

IllegalStateException when running query #780

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
The following query works fine:

use dataverse TinySocial;
for $g in 
(for $u in dataset FacebookUsers group by $u.id with $u return $u) 
return count($g)

I expect the following query to have the same result, but I get an error:

use dataverse TinySocial;
for $g in 
(for $u in dataset FacebookUsers group by $u.id with $u return $u) 
return count(for $x in $g return $x)

PushAggregateIntoGroupbyRule: could not find UNNEST. [IllegalStateException]

Just to be sure that (for $a in $b return $a) is an identity, I tried 
experimenting with:

use dataverse TinySocial;
for $g in 
(for $u in dataset FacebookUsers group by $u.id with $u return $u) 
return count(for $x in (for $y in $g return $y) return $x)

Interestingly, this returns the correct result (no error). Nesting another 
level also works.

(AsterixDB 0.8.5 on Ubuntu 14.04)

Original issue reported on code.google.com by euf...@gmail.com on 28 May 2014 at 9:36