Skip to content

Commit

Permalink
Fix a small warning, to feed this to the tool.
Browse files Browse the repository at this point in the history
Signed-off-by: Johannes Kalmbach <[email protected]>
  • Loading branch information
joka921 committed Jan 7, 2025
1 parent fc20174 commit dde296b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/engine/ExistsScan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ ExistsScan::ExistsScan(QueryExecutionContext* qec,
: Operation{qec},
left_{std::move(left)},
right_{std::move(right)},
existsVariable_{std::move(existsVariable)},
joinColumns_{QueryExecutionTree::getJoinColumns(*left_, *right_)} {}
joinColumns_{QueryExecutionTree::getJoinColumns(*left_, *right_)},
existsVariable_{std::move(existsVariable)} {}

// _____________________________________________________________________________
string ExistsScan::getCacheKeyImpl() const {
Expand Down
13 changes: 9 additions & 4 deletions src/engine/sparqlExpressions/ExistsExpression.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,15 @@ class ExistsExpression : public SparqlExpression {
//____________________________________________________________________________
[[nodiscard]] string getCacheKey(
const VariableToColumnMap& varColMap) const override {
// TODO<joka921> get a proper cache key here
AD_CONTRACT_CHECK(varColMap.contains(variable_));
return absl::StrCat("EXISTS WITH COL ",
varColMap.at(variable_).columnIndex_);
if (varColMap.contains(variable_)) {
return absl::StrCat("EXISTS WITH COL ",
varColMap.at(variable_).columnIndex_);
} else {
// This means that the necessary `ExistsScan` hasn't been set up yet.
// It is not possible to cache such incomplete operations, so we return
// a random cache key.
return std::to_string(ad_utility::FastRandomIntGenerator<size_t>{}());
}
}

// ____________________________________________________________________________
Expand Down

0 comments on commit dde296b

Please sign in to comment.