Value of stats.FullCount is wrong when AQL IN operator is used

128 Views Asked by At

ArangoDB3-3.7.2_win64 arangodbJavaDriver=6.7.5

Assuming collection has more than 100 documents, the following AQL query through the Java driver using AqlQueryOptions().fullCount(true) returns the expected values in stats.fullCount:

FOR a IN SomeCollection FILTER a.field = @p1 SORT a.field ASC LIMIT 0,100 RETURN a

But a similar query using the IN operator the value of stats.fullCount is unexpectedly 100:

FOR a IN SomeCollection FILTER a.field IN [@p1, @p2] SORT a.field ASC LIMIT 0,100 RETURN a

Oddly, when I downgrade to ArangoDB3-3.6.3_win64 both queries work as expected and return the correct value in stats.fullCount

Can the correct functionality be restored?

1

There are 1 best solutions below

0
On

Equality operator in AQL is ==, while = is the assignment operator. So your first query should be like:

FOR a IN SomeCollection FILTER a.field == @p1 SORT a.field ASC LIMIT 0,100 RETURN a