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

crazycs520
Copy link
Contributor

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

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 Show resolved Hide resolved
ast/dml.go Show resolved Hide resolved
Copy link
Contributor

@winkyao winkyao left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@zimulala zimulala left a comment

Choose a reason for hiding this comment

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

LGTM

ast/dml.go Show resolved Hide resolved
@zimulala zimulala added the status/LGT2 LGT2 label May 6, 2019
@crazycs520 crazycs520 merged commit e336082 into pingcap:master May 6, 2019
crazycs520 added a commit to crazycs520/parser that referenced this pull request Jun 19, 2019
tiancaiamao pushed a commit to tiancaiamao/parser that referenced this pull request Apr 27, 2021
lyonzhi pushed a commit to lyonzhi/parser that referenced this pull request Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants