-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Fix default value bug #1452
Conversation
Unit testing passed. |
src/graph/InsertVertexExecutor.cpp
Outdated
@@ -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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May bad orz
Unit testing passed. |
@@ -46,6 +46,36 @@ TEST_F(SchemaTest, TestComment) { | |||
} | |||
} | |||
|
|||
TEST_F(SchemaTest, TestDefaultValue) { | |||
auto client = gEnv->getClient(); |
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
data_test include it
There was a problem hiding this 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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
duplicate with previous
There was a problem hiding this comment.
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
Unit testing passed. |
* Fixed default value related bug * Check unknown column * Fix ut failed Co-authored-by: dutor <440396+dutor@users.noreply.github.com>
* 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>
colse #1421, close #1368