简体   繁体   English

使用 AQL IN 运算符时 stats.FullCount 的值错误

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

ArangoDB3-3.7.2_win64 arangodbJavaDriver=6.7.5 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:假设集合有超过 100 个文档,以下 AQL 查询通过 Java 驱动程序使用 AqlQueryOptions().fullCount(true) 返回 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:但是使用 IN 运算符的类似查询 stats.fullCount 的值意外地为 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奇怪的是,当我降级到 ArangoDB3-3.6.3_win64 时,两个查询都按预期工作并在 stats.fullCount 中返回正确的值

Can the correct functionality be restored?能否恢复正确的功能?

Equality operator in AQL is == , while = is the assignment operator. AQL 中的相等运算符是== ,而=是赋值运算符。 So your first query should be like:所以你的第一个查询应该是这样的:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 与IN运算符一起使用时,JPA CONCATE引发异常 - JPA CONCATE when used with IN operator throws Exception 和运算符在else id块中使用时不起作用 - and operator not working when used in else id block 当使用“-”连字符或“_”下划线时,Spring Boot 从 YAML 配置加载错误的键值对映射 - Spring Boot Loads wrong key-value pair for map from YAML configureation when '-' hyphen OR '_' underscore is used 与泛型一起使用时如何解决“二元运算符'+'的错误操作数”? - How to solve “bad operand for binary operator '+' ” when used with Generics? 乘法时得到错误的值 - Getting wrong value when multiplying Java中两个String对象之间使用+运算符是怎么实现的? - What is the implementation when + operator is used between two String Objects in Java? 将if / else块转换为三元运算符时的错误答案 - wrong answer when converting if/else block to ternary operator 为什么在Java中捕获多个异常时使用按位OR运算符(|)? - Why is the bitwise OR operator ( | ) used when catching multiple exceptions in Java? 在Eclipse中使用相等运算符(==)进行字符串比较时突出显示 - Highlight when equality operator (==) is used for string comparisons in Eclipse 获取玩家统计信息时,MySQLNonTransientConnectionException - MySQLNonTransientConnectionException when getting player stats
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM