From 71a412ef96043206ba5ca99fbde684a84c09fdeb Mon Sep 17 00:00:00 2001 From: jbajic Date: Wed, 29 Mar 2023 15:00:18 +0200 Subject: [PATCH] Fix clang tidy error --- src/query/v2/plan/operator.cpp | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/src/query/v2/plan/operator.cpp b/src/query/v2/plan/operator.cpp index fae4d8e65..8f7a1d678 100644 --- a/src/query/v2/plan/operator.cpp +++ b/src/query/v2/plan/operator.cpp @@ -2158,22 +2158,20 @@ class OptionalCursor : public Cursor { // if successful, next Pull from this should not pull_input_ pull_input_ = false; return true; - } else { - // failed to Pull from the merge_match cursor - if (pull_input_) { - // if we have just now pulled from the input - // and failed to pull from optional_ so set the - // optional symbols to Null, ensure next time the - // input gets pulled and return true - for (const Symbol &sym : self_.optional_symbols_) frame[sym] = TypedValue(context.evaluation_context.memory); - pull_input_ = true; - return true; - } - // we have exhausted optional_cursor_ after 1 or more successful Pulls - // attempt next input_cursor_ pull - pull_input_ = true; - continue; } + // failed to Pull from the merge_match cursor + if (pull_input_) { + // if we have just now pulled from the input + // and failed to pull from optional_ so set the + // optional symbols to Null, ensure next time the + // input gets pulled and return true + for (const Symbol &sym : self_.optional_symbols_) frame[sym] = TypedValue(context.evaluation_context.memory); + pull_input_ = true; + return true; + } + // we have exhausted optional_cursor_ after 1 or more successful Pulls + // attempt next input_cursor_ pull + pull_input_ = true; } }