diff --git a/src/executor/ShowExecutor.cpp b/src/executor/ShowExecutor.cpp index 8ac46f9322788c5e5eeccdd7e35298d453d0eb55..c74b0b425ee0e3cc7aab7a7e2adc36cca7637e6a 100644 --- a/src/executor/ShowExecutor.cpp +++ b/src/executor/ShowExecutor.cpp @@ -169,6 +169,7 @@ void ShowExecutor::showTags() { rows.emplace_back(); rows.back().set_columns(std::move(row)); } + resp_->set_rows(std::move(rows)); DCHECK(onFinish_); onFinish_(); }; @@ -208,6 +209,7 @@ void ShowExecutor::showEdges() { rows.emplace_back(); rows.back().set_columns(std::move(row)); } + resp_->set_rows(std::move(rows)); DCHECK(onFinish_); onFinish_(); }; diff --git a/src/executor/test/SchemaTest.cpp b/src/executor/test/SchemaTest.cpp index a8cc854dfd2c5349dcd4504d4228d8974c2c8b6f..fff1def90047ac077cc8ba058dfc6709a806f9c8 100644 --- a/src/executor/test/SchemaTest.cpp +++ b/src/executor/test/SchemaTest.cpp @@ -175,6 +175,18 @@ TEST_F(SchemaTest, metaCommunication) { }; EXPECT_TRUE(verifyResult(resp, expected)); } + { + cpp2::ExecutionResponse resp; + std::string query = "SHOW EDGES"; + auto code = client->execute(query, resp); + sleep(FLAGS_load_data_interval_second + 1); + ASSERT_EQ(cpp2::ErrorCode::SUCCEEDED, code); + std::vector<uniform_tuple_t<std::string, 1>> expected{ + {"buy"}, + {"education"}, + }; + ASSERT_TRUE(verifyResult(resp, expected)); + } { cpp2::ExecutionResponse resp; std::string query = "CREATE SPACE my_space(partition_num=9, replica_factor=3)"; @@ -220,6 +232,11 @@ TEST_F(SchemaTest, metaCommunication) { auto code = client->execute(query, resp); sleep(FLAGS_load_data_interval_second + 1); ASSERT_EQ(cpp2::ErrorCode::SUCCEEDED, code); + std::vector<uniform_tuple_t<std::string, 1>> expected{ + {"animal"}, + {"person"}, + }; + ASSERT_TRUE(verifyResult(resp, expected)); } { cpp2::ExecutionResponse resp;