Skip to content

Commit

Permalink
first revision after code review
Browse files Browse the repository at this point in the history
  • Loading branch information
JackChuengQAQ committed Oct 27, 2024
1 parent b1641d8 commit 49ca93a
Show file tree
Hide file tree
Showing 16 changed files with 292 additions and 325 deletions.
12 changes: 5 additions & 7 deletions src/graph/executor/mutate/DeleteExecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,8 @@ folly::Future<Status> DeleteVerticesExecutor::deleteVertices() {
continue;
}
if (!SchemaUtil::isValidVid(val, *spaceInfo.spaceDesc.vid_type_ref())) {
std::stringstream ss;
ss << "Wrong vid type `" << val.type() << "', value `" << val.toString() << "'";
return Status::Error(ss.str());
auto errorMsg = fmt::format("Wrong vid type `{}`, value `{}`", val.type(), val.toString());
return Status::Error(errorMsg);
}
vertices.emplace_back(std::move(val));
}
Expand Down Expand Up @@ -103,9 +102,8 @@ folly::Future<Status> DeleteTagsExecutor::deleteTags() {
continue;
}
if (!SchemaUtil::isValidVid(val, *spaceInfo.spaceDesc.vid_type_ref())) {
std::stringstream ss;
ss << "Wrong vid type `" << val.type() << "', value `" << val.toString() << "'";
return Status::Error(ss.str());
auto errorMsg = fmt::format("Wrong vid type `{}`, value `{}`", val.type(), val.toString());
return Status::Error(errorMsg);
}
delTag.id_ref() = val;
delTag.tags_ref() = dtNode->tagIds();
Expand Down Expand Up @@ -147,7 +145,7 @@ folly::Future<Status> DeleteEdgesExecutor::deleteEdges() {
DCHECK(!inputVar.empty());
auto& inputResult = ectx_->getResult(inputVar);
auto iter = inputResult.iter();
edgeKeys.reserve(iter->size()); // TODO(zhijie): the reserve size should be doubled
edgeKeys.reserve(iter->size() * 2);
QueryExpressionContext ctx(ectx_);
for (; iter->valid(); iter->next()) {
storage::cpp2::EdgeKey edgeKey;
Expand Down
Loading

0 comments on commit 49ca93a

Please sign in to comment.