-
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
Support show create tag/edge xxx, show create space xxx SQL #496
Conversation
Can one of the admins verify this patch? |
2743b1c
to
0aa85d3
Compare
Please code review, thx. |
src/graph/CreateEdgeExecutor.cpp
Outdated
break; | ||
} | ||
} | ||
if (schema_.schema_prop.ttl_duration != 0) { |
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.
Please put this in setTTLDuration()
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.
no, no. when only set ttl_col, the ttl_duration is default 0.
This situation is implicit ttl, which is forbidden here.
SQL like:
create tag t ( a int) ttl_duration = 10;
we don't support.
src/graph/CreateTagExecutor.cpp
Outdated
} | ||
} | ||
|
||
if (schema_.schema_prop.ttl_duration != 0) { |
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.
ditto
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.
when onlyse set ttl_col, the ttl_duration is default 0.
This situation is implicit ttl, which is forbidden here.
SQL like:
create tag t ( a int) ttl_duratuion = 10; we don't support.
src/graph/CreateTagExecutor.cpp
Outdated
auto future = mc->createTagSchema(spaceId, *name, schema); | ||
// set schema_.schema_prop default | ||
// 0 means infinity | ||
schema_.schema_prop.set_ttl_duration(0); |
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.
It can init in the constructor of schema_prop
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.
👍👍👍,good catch!
* This source code is licensed under Apache 2.0 License | ||
* (found in the LICENSE.Apache file in the root directory) | ||
* This source code is licensed under Apache 2.0 License, | ||
* attached with Common Clause Condition 1.0, found in the LICENSES directory. |
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.
well done
6634a04
to
83c97fe
Compare
rebase master. please code review again, thx |
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.
is this a mixed pr? should I wait for #422?
@@ -96,12 +102,14 @@ std::string CreateSpaceSentence::toString() const { | |||
return buf; | |||
} | |||
|
|||
|
|||
std::string DropSpaceSentence::toString() const { |
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.
const std::string
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.
Never qualify with const when you return by value.
83c97fe
to
a7285f7
Compare
a7285f7
to
05d8f0e
Compare
Unit testing failed. |
05d8f0e
to
96d2c71
Compare
Unit testing failed. |
8dfda1b
to
b0ff8f8
Compare
Jenkins, go |
Unit testing passed. |
Jenkins, go |
Unit testing passed. |
cef903a
to
190b5fb
Compare
Rebase master, please review, thx. |
190b5fb
to
f8c0f81
Compare
src/graph/ShowExecutor.cpp
Outdated
@@ -19,7 +19,14 @@ ShowExecutor::ShowExecutor(Sentence *sentence, | |||
|
|||
|
|||
Status ShowExecutor::prepare() { | |||
return Status::OK(); | |||
if (sentence_->showType() == ShowSentence::ShowType::kShowTags || |
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.
please see pr #740
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.
Good catch, 👍👍
Unit testing passed. |
Unit testing passed. |
f8c0f81
to
95ba55f
Compare
support time to live alter tag/edge drop column, and the column to be delete is as TTL column address dangleptr's comment
95ba55f
to
b365641
Compare
Jenkins, go! |
Fix and rebase master. Please review again, thx. |
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.
Well done
Unit testing passed. |
1 similar comment
Unit testing passed. |
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.
Unit testing passed. |
…nc#496) * improve unreserved keywords feature support time to live alter tag/edge drop column, and the column to be delete is as TTL column address dangleptr's comment * address laura-ding's comments * rebase master
…nc#496) * improve unreserved keywords feature support time to live alter tag/edge drop column, and the column to be delete is as TTL column address dangleptr's comment * address laura-ding's comments * rebase master
Support show create tag/edge xxx, show create space xxx SQL
Close #439
This PR contain TTL_schema (PR #422). Because it depends on the attributes of the schema.