mirror of https://gitee.com/bigwinds/arangodb
Add stubs for RemoteBlock.
This commit is contained in:
parent
e9bac83e67
commit
5c7d058043
|
@ -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--\\|/// @\\}\\)"
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue