-
Notifications
You must be signed in to change notification settings - Fork 328
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
docs(rfcs): multi-dimension partition rule #3350
Conversation
Signed-off-by: Ruihang Xia <[email protected]>
Signed-off-by: Ruihang Xia <[email protected]>
Signed-off-by: Ruihang Xia <[email protected]>
Signed-off-by: Ruihang Xia <[email protected]>
As to this syntax: PARTITION ON COLUMNS (c, b, a) (
a < 10,
10 >= a AND a < 20,
20 >= a AND b < 100,
20 >= a AND b > 100
) Do we have to ensure it's legit in that the partition columns do divide the value space correctly? For example, a range is missing in this partition rule: PARTITION ON COLUMNS (c, b, a) (
a < 10,
10 >= a AND a < 20,
20 >= a AND b < 1,
# 20 >= a AND b >= 1 AND b <= 100 is missing
20 >= a AND b > 100
) If we do, I'm afraid it's not an easy task to do, especially facing multiple partition columns and partition data types (numbers, chars and dates). |
I'm thinking have a "default" region which is for all the remaining. It works as there is no partition rule. |
Thinking of the flexibility of our repartitioning in the future, a "default" region is acceptable. Just how to define the syntax? |
No need to specify. It exists by default |
Why it's existed by default? Which region to put the data in range " PARTITION ON COLUMNS (c, b, a) (
a < 10,
10 >= a AND a < 20,
20 >= a AND b < 1,
20 >= a AND b > 100
) |
The default one.
For simplicity. This is something like a |
But we don't provide a default region currently, am I right? I think it's better to add it to the RFC too. |
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.
Almost LGTM
Signed-off-by: Ruihang Xia <[email protected]>
Updated. PTAL @MichaelScofield |
Signed-off-by: Ruihang Xia <[email protected]>
But if the default region definition doesn't show up in the partition rule, it's a little surprise to user. If the default region is some region in the partition rule, for example, the first one, then it's against the intuition that the region can only contain the data with the range in it. |
No, this is not how the default rule works and for. It's a conventional setting for usability. Or would an explicit declaration be no such surprise? Like PARTITION ON COLUMNS (c, b, a) (
a < 10,
10 >= a AND a < 20,
20 >= a AND b < 1,
# 20 >= a AND b >= 1 AND b <= 100 is missing
DEFAULT,
20 >= a AND b > 100
) If the |
@MichaelScofield PTAL |
I hereby agree to the terms of the GreptimeDB CLA
What's changed and what's your intention?
Propose a new region partition scheme.
🖥️ rendered
Checklist
Refer to a related PR or issue link (optional)