mirror of https://gitee.com/bigwinds/arangodb
This commit is contained in:
parent
9b28232b12
commit
e266efdf96
|
@ -1,6 +1,8 @@
|
|||
v3.3.13 (XXXX-XX-XX)
|
||||
--------------------
|
||||
|
||||
* fixed issue #5977: Unexpected execution plan when subquery contains COLLECT
|
||||
|
||||
* Bugfix: The AQL syntax variants `UPDATE/REPLACE k WITH d` now correctly take
|
||||
_rev from k instead of d (when ignoreRevs is false) and ignore d._rev.
|
||||
|
||||
|
|
|
@ -973,6 +973,9 @@ int DistinctCollectBlock::getOrSkipSome(size_t atLeast, size_t atMost,
|
|||
if (!skipping) {
|
||||
size_t i = 0;
|
||||
for (auto& it : _groupRegisters) {
|
||||
if (skipped > 0) {
|
||||
res->copyValuesFromFirstRow(skipped, static_cast<RegisterId>(cur->getNrRegs()));
|
||||
}
|
||||
res->setValue(skipped, it.first, groupValues[i].clone());
|
||||
++i;
|
||||
}
|
||||
|
|
|
@ -207,6 +207,17 @@ function ahuacatlDistinct () {
|
|||
assertEqual(100, integers.length);
|
||||
assertEqual(100, strings.length);
|
||||
},
|
||||
|
||||
testDistinctInOptimizedAwaySubquery : function () {
|
||||
let query = "LET values = (FOR i IN " + c.name() + " RETURN DISTINCT i.value1) FOR doc IN values RETURN 42";
|
||||
containsDistinct(query);
|
||||
let result = AQL_EXECUTE(query).json;
|
||||
|
||||
assertEqual(100, result.length);
|
||||
|
||||
let plan = AQL_EXPLAIN(query).plan;
|
||||
assertNotEqual(-1, plan.rules.indexOf("inline-subqueries"));
|
||||
},
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief distinct usage
|
||||
|
|
Loading…
Reference in New Issue