Skip to content

Commit

Permalink
fix some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
liuyu85cn committed Dec 29, 2021
1 parent 7887125 commit 88b1ebc
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/storage/CommonUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ struct RuntimeContext {
bool insert_ = false;

// some times, one line is filter out but still return (has edge)
// and some time, this line is just removed from thre return result
// and some time, this line is just removed from the return result
bool filterInvalidResultOut = false;

ResultStatus resultStat_{ResultStatus::NORMAL};
Expand Down
4 changes: 3 additions & 1 deletion src/storage/exec/FilterNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ class FilterNode : public IterateNode<T> {
return nebula::cpp2::ErrorCode::SUCCEEDED;
}

void setFilterMode(FilterMode mode) { mode_ = mode; }
void setFilterMode(FilterMode mode) {
mode_ = mode;
}

private:
bool check() override {
Expand Down
5 changes: 3 additions & 2 deletions src/storage/exec/MultiTagNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,13 @@ class MultiTagNode : public IterateNode<VertexID> {
}

bool valid() const override {
// return valid_;
auto ret = tagNodes_.back()->valid();
return ret;
}

void next() override { tagNodes_.back()->next(); }
void next() override {
tagNodes_.back()->next();
}

folly::StringPiece key() const override {
LOG(FATAL) << "not allowed to do this";
Expand Down
18 changes: 6 additions & 12 deletions src/storage/test/GetNeighborsTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ TEST(GetNeighborsTest, PropertyTest) {
auto resp = std::move(fut).get();

ASSERT_EQ(0, (*resp.result_ref()).failed_parts.size());
// vId, stat, player, - teammate, - serve, expr
// vId, stat, player, expr
size_t expectColumnCount = 4;
QueryTestUtils::checkResponse(
*resp.vertices_ref(), vertices, over, tags, edges, 1, expectColumnCount);
Expand Down Expand Up @@ -1120,14 +1120,7 @@ TEST(GetNeighborsTest, TtlTest) {
}
ASSERT_EQ("Tim Duncan", (*resp.vertices_ref()).rows[0].values[0].getStr());
ASSERT_TRUE((*resp.vertices_ref()).rows[0].values[1].empty()); // stat
ASSERT_TRUE((*resp.vertices_ref()).rows[0].values[2].empty()); // expr player expired
// ASSERT_TRUE((*resp.vertices_ref()).rows[0].values[3].empty()); // team not exists
// ASSERT_TRUE((*resp.vertices_ref()).rows[0].values[4].empty()); // general tag not exists
// ASSERT_TRUE((*resp.vertices_ref()).rows[0].values[5].isList()); // - teammate valid
// ASSERT_TRUE((*resp.vertices_ref()).rows[0].values[5].empty()); // - serve expired
// ASSERT_TRUE((*resp.vertices_ref()).rows[0].values[7].empty()); // + serve expired
// ASSERT_TRUE((*resp.vertices_ref()).rows[0].values[8].isList()); // + teammate valid
// ASSERT_TRUE((*resp.vertices_ref()).rows[0].values[9].empty()); // expr
ASSERT_TRUE((*resp.vertices_ref()).rows[0].values[2].empty()); // expr
}
FLAGS_mock_ttl_col = false;
}
Expand Down Expand Up @@ -1476,7 +1469,7 @@ TEST(GetNeighborsTest, MultiTagNodeTest) {
pool,
SourcePropertyExpression::make(pool, folly::to<std::string>(player), "avgScore"),
ConstantExpression::make(pool, Value(9999)));
(*req.traverse_spec_ref()).set_filter(Expression::encode(exp));
req.traverse_spec_ref()->filter_ref() = Expression::encode(exp);
}

auto* processor = GetNeighborsProcessor::instance(env, nullptr, threadPool.get());
Expand Down Expand Up @@ -1509,7 +1502,7 @@ TEST(GetNeighborsTest, MultiTagNodeTest) {
pool,
SourcePropertyExpression::make(pool, folly::to<std::string>(player), "avgScore"),
ConstantExpression::make(pool, Value(19)));
(*req.traverse_spec_ref()).set_filter(Expression::encode(exp));
req.traverse_spec_ref()->filter_ref() = Expression::encode(exp);
}

auto* processor = GetNeighborsProcessor::instance(env, nullptr, threadPool.get());
Expand Down Expand Up @@ -1603,7 +1596,8 @@ TEST(GetNeighborsTest, FilterTest) {
pool,
SourcePropertyExpression::make(pool, folly::to<std::string>(player), "avgScore"),
ConstantExpression::make(pool, Value(18)));
(*req.traverse_spec_ref()).set_filter(Expression::encode(exp));
// (*req.traverse_spec_ref()).set_filter(Expression::encode(exp));
req.traverse_spec_ref()->filter_ref() = Expression::encode(exp);
}

auto* processor = GetNeighborsProcessor::instance(env, nullptr, threadPool.get());
Expand Down

0 comments on commit 88b1ebc

Please sign in to comment.