1
0
Fork 0

Add stubs for RemoteBlock.

This commit is contained in:
Max Neunhoeffer 2014-09-26 13:34:08 +02:00
parent e9bac83e67
commit 5c7d058043
2 changed files with 83 additions and 2 deletions

View File

@ -3929,6 +3929,82 @@ size_t ScatterBlock::skipSomeForShard (size_t atLeast, size_t atMost, std::strin
return skipped;
}
// -----------------------------------------------------------------------------
// --SECTION-- class RemoteBlock
// -----------------------------------------------------------------------------
////////////////////////////////////////////////////////////////////////////////
/// @brief initialize
////////////////////////////////////////////////////////////////////////////////
int RemoteBlock::initialize () {
int res = ExecutionBlock::initialize();
if (res != TRI_ERROR_NO_ERROR) {
return res;
}
return TRI_ERROR_NO_ERROR;
}
////////////////////////////////////////////////////////////////////////////////
/// @brief initializeCursor, could be called multiple times
////////////////////////////////////////////////////////////////////////////////
int RemoteBlock::initializeCursor (AqlItemBlock* items, size_t pos) {
return TRI_ERROR_NO_ERROR;
}
////////////////////////////////////////////////////////////////////////////////
/// @brief shutdown, will be called exactly once for the whole query
////////////////////////////////////////////////////////////////////////////////
int RemoteBlock::shutdown () {
return TRI_ERROR_NO_ERROR;
}
////////////////////////////////////////////////////////////////////////////////
/// @brief getSome
////////////////////////////////////////////////////////////////////////////////
AqlItemBlock* RemoteBlock::getSome (size_t atLeast,
size_t atMost) {
return nullptr;
}
////////////////////////////////////////////////////////////////////////////////
/// @brief skipSome
////////////////////////////////////////////////////////////////////////////////
size_t RemoteBlock::skipSome (size_t atLeast, size_t atMost) {
return 0;
}
////////////////////////////////////////////////////////////////////////////////
/// @brief hasMore
////////////////////////////////////////////////////////////////////////////////
bool RemoteBlock::hasMore () {
return true;
}
////////////////////////////////////////////////////////////////////////////////
/// @brief count
////////////////////////////////////////////////////////////////////////////////
int64_t RemoteBlock::count () const {
return 0;
}
////////////////////////////////////////////////////////////////////////////////
/// @brief remaining
////////////////////////////////////////////////////////////////////////////////
int64_t RemoteBlock::remaining () {
return 0;
}
// Local Variables:
// mode: outline-minor
// outline-regexp: "^\\(/// @brief\\|/// {@inheritDoc}\\|/// @addtogroup\\|// --SECTION--\\|/// @\\}\\)"

View File

@ -2575,11 +2575,16 @@ namespace triagens {
}
////////////////////////////////////////////////////////////////////////////////
/// @brief the cost of a remote node is 1
/// @brief the cost of a remote node is that of its dependency
////////////////////////////////////////////////////////////////////////////////
double estimateCost () {
return _dependencies[0]->estimateCost();
if (_dependencies.size() == 1) {
return _dependencies[0]->estimateCost();
}
else {
return 1;
}
}
};