-
Notifications
You must be signed in to change notification settings - Fork 489
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 table ... between ... and
syntax
#321
Conversation
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.
rest LGTM
Codecov Report
@@ Coverage Diff @@
## master #321 +/- ##
==========================================
- Coverage 53.37% 53.09% -0.29%
==========================================
Files 31 31
Lines 6540 6575 +35
==========================================
Hits 3491 3491
- Misses 2707 2742 +35
Partials 342 342
Continue to review full report at Codecov.
|
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
split table ... between ... and
syntax
ast/dml.go
Outdated
|
||
type SplitOption struct { | ||
Min []ExprNode | ||
Max []ExprNode |
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.
I think lower
and upper
are more suitable to describe ranges
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.
done.
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
What problem does this PR solve?
Add new syntax for
split index region
.SPLIT TABLE [table_name] INDEX [index_name] BETWEEN (lower_value) AND (upper_value) REGIONS [region_num]
Eg1: int type.
Upper sql will split
5
regions of the tablet
indexidx1
in range0~1000
. Every region range like below:Region1: -inf ~ 200
Region2: 200 ~ 400
Region3: 400 ~ 600
Region4: 600 ~ 800
Region5: 800 ~ +inf
What is changed and how it works?
Check List
Tests
Code changes
Side effects
Related changes