Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix default value bug #1452

Merged
merged 4 commits into from
Dec 26, 2019
Merged

Fix default value bug #1452

merged 4 commits into from
Dec 26, 2019

Conversation

laura-ding
Copy link
Contributor

colse #1421, close #1368

@laura-ding laura-ding added the ready-for-testing PR: ready for the CI test label Dec 15, 2019
@nebula-community-bot
Copy link
Member

Unit testing passed.

@laura-ding laura-ding changed the title Fix some default value bug Fix default value bug Dec 16, 2019
@@ -48,14 +48,14 @@ Status InsertVertexExecutor::check() {
auto *tagName = item->tagName();
auto tagStatus = ectx()->schemaManager()->toTagID(spaceId_, *tagName);
if (!tagStatus.ok()) {
LOG(ERROR) << "No schema found for " << tagName;
LOG(ERROR) << "No schema found for " << *tagName;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May bad orz

@jude-zhu jude-zhu requested a review from dutor December 17, 2019 03:57
@nebula-community-bot
Copy link
Member

Unit testing passed.

@@ -46,6 +46,36 @@ TEST_F(SchemaTest, TestComment) {
}
}

TEST_F(SchemaTest, TestDefaultValue) {
auto client = gEnv->getClient();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have a test case about default value ?

Copy link
Contributor Author

@laura-ding laura-ding Dec 20, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

data_test include it

Copy link
Contributor

@CPWstatic CPWstatic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

std::string cmd = "CREATE TAG default_tag(name string DEFAULT \"\", "
"age int DEFAULT \"10\")";
auto code = client->execute(cmd, resp);
ASSERT_EQ(cpp2::ErrorCode::E_EXECUTION_ERROR, code);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duplicate with previous

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the previous the first params without a default value, but this has

@nebula-community-bot
Copy link
Member

Unit testing passed.

@dutor dutor merged commit 739d57c into vesoft-inc:master Dec 26, 2019
tong-hao pushed a commit to tong-hao/nebula that referenced this pull request Jun 1, 2021
* Fixed default value related bug

* Check unknown column

* Fix ut failed

Co-authored-by: dutor <440396+dutor@users.noreply.github.com>
yixinglu pushed a commit to yixinglu/nebula that referenced this pull request Jan 31, 2023
* forbid insert vertex when vertex_key flag is off

* fix issue ent#1420

* fix test case

* fix format

Co-authored-by: Sophie <84560950+Sophie-Xie@users.noreply.github.com>

Co-authored-by: Doodle <13706157+critical27@users.noreply.github.com>
Co-authored-by: Sophie <84560950+Sophie-Xie@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-testing PR: ready for the CI test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

It need to judge the default value is the same as the given type when create schema
5 participants