mirror of https://gitee.com/bigwinds/arangodb
adding skipSome method for GatherBlock.
This commit is contained in:
parent
838290381b
commit
5362ff3203
|
@ -3543,6 +3543,28 @@ AqlItemBlock* GatherBlock::getSome (size_t atLeast, size_t atMost) {
|
|||
|
||||
}
|
||||
|
||||
size_t GatherBlock::skipSome (size_t atLeast, size_t atMost) {
|
||||
|
||||
if (_done) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (isSimple()) {
|
||||
auto res = _dependencies.at(_atDep)->skipSome(atLeast, atMost);
|
||||
while (res == 0 && _atDep < _dependencies.size() - 1) {
|
||||
_atDep++;
|
||||
res = _dependencies.at(_atDep)->skipSome(atLeast, atMost);
|
||||
}
|
||||
if (res == 0) {
|
||||
_done = true;
|
||||
}
|
||||
return res;
|
||||
//} else { // merge sort the results from the deps
|
||||
|
||||
}
|
||||
return 0; // to keep the compiler happy
|
||||
|
||||
}
|
||||
// Local Variables:
|
||||
// mode: outline-minor
|
||||
// outline-regexp: "^\\(/// @brief\\|/// {@inheritDoc}\\|/// @addtogroup\\|// --SECTION--\\|/// @\\}\\)"
|
||||
|
|
|
@ -1515,14 +1515,10 @@ public:
|
|||
|
||||
AqlItemBlock* getSome (size_t, size_t);
|
||||
|
||||
size_t skipSome (size_t, size_t);
|
||||
|
||||
private:
|
||||
|
||||
/*int getOrSkipSome (size_t atLeast,
|
||||
size_t atMost,
|
||||
bool skipping,
|
||||
AqlItemBlock*& result,
|
||||
size_t& skipped);*/
|
||||
|
||||
// the block is simple if we do not do merge sort . . .
|
||||
bool isSimple () {
|
||||
auto en = static_cast<GatherNode const*>(getPlanNode());
|
||||
|
|
Loading…
Reference in New Issue