Apply suggestions from code review

Co-authored-by: Jure Bajic <jure.bajic@memgraph.com>
Co-authored-by: János Benjamin Antal <antaljanosbenjamin@users.noreply.github.com>
This commit is contained in:
gvolfing 2023-01-20 06:22:37 +01:00 committed by GitHub
parent 40835b8c9c
commit 5eea3ceee4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View File

@ -487,7 +487,7 @@ class DistributedScanAllByPrimaryKeyCursor : public Cursor {
bool MakeRequest(RequestRouterInterface &request_router, ExecutionContext &context) {
{
SCOPED_REQUEST_WAIT_PROFILE;
std::optional<std::string> request_label = std::nullopt;
std::optional<std::string> request_label;
if (label_.has_value()) {
request_label = request_router.LabelToName(*label_);
}
@ -512,7 +512,7 @@ class DistributedScanAllByPrimaryKeyCursor : public Cursor {
std::vector<msgs::Value> pk;
MG_ASSERT(primary_key_);
for (auto *primary_key : *primary_key_) {
for (auto *primary_property : *primary_key_) {
pk.push_back(TypedValueToValue(primary_key->Accept(evaluator)));
}

View File

@ -194,7 +194,7 @@ class PlanToJsonVisitor : public virtual HierarchicalLogicalOperatorVisitor {
bool PreVisit(ScanAllByLabelPropertyRange &) override;
bool PreVisit(ScanAllByLabelPropertyValue &) override;
bool PreVisit(ScanAllByLabelProperty &) override;
bool PreVisit(ScanAllByPrimaryKey & /*unused*/) override;
bool PreVisit(ScanAllByPrimaryKey &) override;
bool PreVisit(Produce &) override;
bool PreVisit(Accumulate &) override;

View File

@ -278,7 +278,7 @@ class IndexLookupRewriter final : public HierarchicalLogicalOperatorVisitor {
return true;
}
bool PostVisit(ScanAllByPrimaryKey & /*unused*/) override {
bool PostVisit(ScanAllByPrimaryKey &) override {
prev_ops_.pop_back();
return true;
}
@ -593,7 +593,7 @@ class IndexLookupRewriter final : public HierarchicalLogicalOperatorVisitor {
}
if (!primary_key.empty()) {
// Mark the expressions so they won't be used for an additional, unnecessary filter.
for (const auto &pk : primary_key) {
for (const auto &primary_property : primary_key) {
filter_exprs_for_removal_.insert(pk.first);
filters_.EraseFilter(pk.second);
}