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

*: Add split index region syntax support. #297

Merged
merged 10 commits into from May 6, 2019

Conversation

Projects
None yet
4 participants
@crazycs520
Copy link
Contributor

commented Apr 19, 2019

What problem does this PR solve?

*: Add split index region syntax support.

What is changed and how it works?

This PR support split index region by SQL. Syntax like below:

SPLIT TABLE table_name INDEX index_name BY (val1...), (val2...),(val3...) ...

example

split table t1 idx1 (100), (1000), (10000);   
//range is : 0~100, 100 ~1000, 1000~ 1000010000 ~ maxInt64

split table t1 idx2 ("a", "2000-01-01 00:00:01"),  ("b", "2019-04-17 14:26:19"),  ("c", "");  
// range is: minIndexValue ~ ("a", "2000-01-01 00:00:01"),
("a", "2000-01-01 00:00:01") ~ ("b", "2019-04-17 14:26:19"),
("b", "2019-04-17 14:26:19") ~ ("c", ""),
("c", "") ~ maxIndexValue.

Check List

Tests

  • Unit test
Show resolved Hide resolved parser.y Outdated
Show resolved Hide resolved parser.y Outdated
Show resolved Hide resolved ast/dml.go Outdated
Show resolved Hide resolved ast/dml.go Outdated
Show resolved Hide resolved parser.y Outdated

bb7133 and others added some commits Apr 29, 2019

Update ast/dml.go
Co-Authored-By: crazycs520 <crazycs520@gmail.com>
Update parser.y
Co-Authored-By: crazycs520 <crazycs520@gmail.com>
Update ast/dml.go
Co-Authored-By: crazycs520 <crazycs520@gmail.com>
Show resolved Hide resolved ast/dml.go
@winkyao
Copy link
Member

left a comment

LGTM

@zimulala
Copy link
Member

left a comment

LGTM

Show resolved Hide resolved ast/dml.go

@zimulala zimulala added the LGTM2 label May 6, 2019

@crazycs520 crazycs520 merged commit e336082 into pingcap:master May 6, 2019

3 checks passed

ci/circleci: build-integration Your tests passed on CircleCI!
Details
ci/circleci: build-ut Your tests passed on CircleCI!
Details
license/cla Contributor License Agreement is signed.
Details

crazycs520 added a commit to crazycs520/parser that referenced this pull request Jun 19, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.