1
0
Fork 0

Updates to testing code

This commit is contained in:
Markus Pfeiffer 2019-09-12 15:39:49 +01:00
parent 13add2af10
commit a177f3980b
5 changed files with 13 additions and 8 deletions

View File

@ -566,13 +566,6 @@ bool ExecutionNode::isEqualTo(ExecutionNode const& other) {
other._dependencies.begin(), comparator)));
}
bool ExecutionNode::isEqualTo(ExecutionNode const * other) {
if(other == nullptr) {
return false;
}
return isEqualTo(*other);
}
/// @brief invalidate the cost estimation for the node and its dependencies
void ExecutionNode::invalidateCost() {
_costEstimate.invalidate();

View File

@ -335,7 +335,6 @@ class ExecutionNode {
/// @brief check equality of ExecutionNodes
virtual bool isEqualTo(ExecutionNode const& other);
virtual bool isEqualTo(ExecutionNode const* other);
/// @brief invalidate the cost estimate for the node and its dependencies
virtual void invalidateCost();

View File

@ -81,5 +81,12 @@ CostEstimate SubqueryEndNode::estimateCost() const {
return estimate;
}
bool SubqueryEndNode::isEqualTo(SubqueryEndNode const& other)
{
TRI_ASSERT(_outVariable); TRI_ASSERT(other->_outVariable);
return ExecutionNode::isEqualTo(other) &&
_outVariable->isEqualTo(*other->_outVariable);
}
} // namespace aql
} // namespace arangodb

View File

@ -57,6 +57,7 @@ class SubqueryEndNode : public ExecutionNode {
ExecutionNode* clone(ExecutionPlan* plan, bool withDependencies,
bool withProperties) const override final;
bool isEqualTo(SubqueryEndNode const &other);
std::vector<Variable const*> getVariablesSetHere() const override final {
return std::vector<Variable const*>{_outVariable};

View File

@ -92,3 +92,8 @@ Variable* Variable::varFromVPack(Ast* ast, arangodb::velocypack::Slice const& ba
}
return ast->variables()->createVariable(variable);
}
bool Variable::isEqualTo(Variable const& other) {
meta::details::static_assert_size<Variable, 16>();
return (id == other.id) && (name == other.name);
}