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

fix the bug create space on group #1149

Merged
merged 4 commits into from
Jun 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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