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

Support show create tag/edge xxx, show create space xxx SQL #496

Merged
merged 4 commits into from
Aug 15, 2019

Conversation

ayyt
Copy link
Contributor

@ayyt ayyt commented Jun 4, 2019

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.

@nebula-community-bot
Copy link
Member

Can one of the admins verify this patch?

@ayyt ayyt changed the title Show create tag edge space Support show create tag/edge xxx, show create space xxx SQL Jun 4, 2019
@ayyt ayyt mentioned this pull request Jun 5, 2019
@ayyt ayyt force-pushed the show_create_tag_edge_space branch from 2743b1c to 0aa85d3 Compare June 5, 2019 14:29
@ayyt
Copy link
Contributor Author

ayyt commented Jun 5, 2019

Please code review, thx.

break;
}
}
if (schema_.schema_prop.ttl_duration != 0) {
Copy link
Contributor

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()

Copy link
Contributor Author

@ayyt ayyt Jun 6, 2019

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.

}
}

if (schema_.schema_prop.ttl_duration != 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

Copy link
Contributor Author

@ayyt ayyt Jun 6, 2019

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.

auto future = mc->createTagSchema(spaceId, *name, schema);
// set schema_.schema_prop default
// 0 means infinity
schema_.schema_prop.set_ttl_duration(0);
Copy link
Contributor

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

Copy link
Contributor Author

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.
Copy link
Contributor

Choose a reason for hiding this comment

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

well done

@ayyt ayyt force-pushed the show_create_tag_edge_space branch 8 times, most recently from 6634a04 to 83c97fe Compare June 19, 2019 09:37
@ayyt ayyt added the ready-for-testing PR: ready for the CI test label Jun 19, 2019
@ayyt
Copy link
Contributor Author

ayyt commented Jun 19, 2019

rebase master. please code review again, thx

Copy link
Contributor

@whitewum whitewum left a 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 {
Copy link
Contributor

Choose a reason for hiding this comment

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

const std::string

Copy link
Contributor Author

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.

@ayyt
Copy link
Contributor Author

ayyt commented Jun 20, 2019

is this a mixed pr? should I wait for #422?

Yeah, the pr contains PR #422.
After pr 422 merged, I will update this PR.

@ayyt ayyt force-pushed the show_create_tag_edge_space branch from 83c97fe to a7285f7 Compare June 20, 2019 13:31
@ayyt ayyt force-pushed the show_create_tag_edge_space branch from a7285f7 to 05d8f0e Compare June 28, 2019 09:12
@nebula-community-bot
Copy link
Member

Unit testing failed.

@ayyt ayyt force-pushed the show_create_tag_edge_space branch from 05d8f0e to 96d2c71 Compare June 28, 2019 10:16
@nebula-community-bot
Copy link
Member

Unit testing failed.

@ayyt ayyt removed the ready-for-testing PR: ready for the CI test label Jun 28, 2019
@ayyt ayyt force-pushed the show_create_tag_edge_space branch 2 times, most recently from 8dfda1b to b0ff8f8 Compare June 28, 2019 13:33
@ayyt
Copy link
Contributor Author

ayyt commented Jun 28, 2019

Jenkins, go

@ayyt ayyt added the ready-for-testing PR: ready for the CI test label Jun 28, 2019
@nebula-community-bot
Copy link
Member

Unit testing passed.

@ayyt
Copy link
Contributor Author

ayyt commented Jul 31, 2019

Jenkins, go

@nebula-community-bot
Copy link
Member

Unit testing passed.

@ayyt ayyt force-pushed the show_create_tag_edge_space branch from cef903a to 190b5fb Compare August 13, 2019 06:43
@ayyt
Copy link
Contributor Author

ayyt commented Aug 13, 2019

Rebase master, please review, thx.

@ayyt ayyt force-pushed the show_create_tag_edge_space branch from 190b5fb to f8c0f81 Compare August 13, 2019 06:45
@@ -19,7 +19,14 @@ ShowExecutor::ShowExecutor(Sentence *sentence,


Status ShowExecutor::prepare() {
return Status::OK();
if (sentence_->showType() == ShowSentence::ShowType::kShowTags ||
Copy link
Contributor

Choose a reason for hiding this comment

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

please see pr #740

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, 👍👍

@nebula-community-bot
Copy link
Member

Unit testing passed.

@nebula-community-bot
Copy link
Member

Unit testing passed.

@ayyt ayyt force-pushed the show_create_tag_edge_space branch from f8c0f81 to 95ba55f Compare August 13, 2019 08:08
ayyt added 3 commits August 13, 2019 16:08
support time to live

alter tag/edge drop column, and the column to be delete is as TTL column

address dangleptr's comment
@ayyt ayyt force-pushed the show_create_tag_edge_space branch from 95ba55f to b365641 Compare August 13, 2019 08:09
@ayyt
Copy link
Contributor Author

ayyt commented Aug 13, 2019

Jenkins, go!

@ayyt
Copy link
Contributor Author

ayyt commented Aug 13, 2019

Fix and rebase master. Please review again, thx.

Copy link
Contributor

@laura-ding laura-ding left a comment

Choose a reason for hiding this comment

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

Well done

@nebula-community-bot
Copy link
Member

Unit testing passed.

1 similar comment
@nebula-community-bot
Copy link
Member

Unit testing passed.

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.

@nebula-community-bot
Copy link
Member

Unit testing passed.

@dutor dutor merged commit d8c7fd8 into vesoft-inc:master Aug 15, 2019
yixinglu pushed a commit to yixinglu/nebula that referenced this pull request Feb 16, 2020
…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
tong-hao pushed a commit to tong-hao/nebula that referenced this pull request Jun 1, 2021
…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
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.

Support show create tag/edge xxx, show create space xxx SQL
6 participants