Skip to content
This repository has been archived by the owner on Dec 1, 2022. It is now read-only.

Commit

Permalink
Fix the bug create space on group (#1149)
Browse files Browse the repository at this point in the history
* fix create space on group

* fix bug create space on group

* fix the bug create space on group v2

* fix the bug create space on group v3
  • Loading branch information
tongheihei authored Jun 23, 2021
1 parent 3c65733 commit ab6a939
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/parser/AdminSentences.h
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,10 @@ class CreateSpaceSentence final : public CreateSentence {
return spaceName_.get();
}

const std::string* groupName() const {
return groupName_.get();
}

void setOpts(SpaceOptList* spaceOpts) {
spaceOpts_.reset(spaceOpts);
}
Expand All @@ -333,10 +337,6 @@ class CreateSpaceSentence final : public CreateSentence {
groupName_.reset(name);
}

const std::string* groupName() const {
return groupName_.get();
}

const SpaceOptList* spaceOpts() const {
return spaceOpts_.get();
}
Expand Down
3 changes: 3 additions & 0 deletions src/validator/AdminValidator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ Status CreateSpaceValidator::validateImpl() {
ifNotExist_ = sentence->isIfNotExist();
auto status = Status::OK();
spaceDesc_.set_space_name(std::move(*(sentence->spaceName())));
if (sentence->groupName()) {
spaceDesc_.set_group_name(std::move(*(sentence->groupName())));
}
StatusOr<std::string> retStatusOr;
std::string result;
auto* charsetInfo = qctx_->getCharsetInfo();
Expand Down

0 comments on commit ab6a939

Please sign in to comment.