From 1c40e8befd4a0a3e0d06582a3ec7f2fd9a83616e Mon Sep 17 00:00:00 2001 From: xtcyclist <7731943+xtcyclist@users.noreply.github.com> Date: Tue, 10 Jan 2023 14:24:11 +0800 Subject: [PATCH] resumed .h --- src/common/expression/test/ExpressionContextMock.h | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/common/expression/test/ExpressionContextMock.h b/src/common/expression/test/ExpressionContextMock.h index c280de58ac4..fab7d557414 100644 --- a/src/common/expression/test/ExpressionContextMock.h +++ b/src/common/expression/test/ExpressionContextMock.h @@ -24,16 +24,7 @@ class ExpressionContextMock final : public ExpressionContext { } void setInnerVar(const std::string& var, Value val) override { - if (var == "xxx") { - if (vals_.empty()) { - vals_.emplace_back(val); - indices_[var] = vals_.size() - 1; - } else { - vals_[indices_[var]] = val; - } - } else { - exprValueMap_[var] = std::move(val); - } + exprValueMap_[var] = std::move(val); } const Value& getInnerVar(const std::string& var) const override { @@ -152,7 +143,7 @@ class ExpressionContextMock final : public ExpressionContext { void setVar(const std::string& var, Value val) override { // used by tests of list comprehesion, predicate or reduce - if (var == "n" || var == "p" || var == "totalNum" || var == "v") { + if (var == "n" || var == "p" || var == "totalNum") { vals_.emplace_back(val); indices_[var] = vals_.size() - 1; }