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 list default partition #33

Merged
merged 2 commits into from
Oct 20, 2020
Merged

Conversation

crazycs520
Copy link
Collaborator

Signed-off-by: crazycs520 crazycs520@gmail.com

What problem does this PR solve?

related parser: pingcap/parser#1062

CREATE TABLE t (a int, b int) partition by list (a) (partition p0 values IN (1), partition p1 values IN (DEFAULT));
insert into t values(1,2),(2,3),(3,4);
select * from t partition (p0);
 select * from t partition (p1);
test> CREATE TABLE t (a int, b int) partition by list (a) (partition p0 values IN (1), partition p1 values IN (DEFAULT));
Query OK, 0 rows affected
Time: 0.007s
test> insert into t values(1,2),(2,3),(3,4);
Query OK, 3 rows affected
Time: 0.004s
test> select * from t partition (p0);
+---+---+
| a | b |
+---+---+
| 1 | 2 |
+---+---+
1 row in set
Time: 0.011s
test> select * from t partition (p1);
+---+---+
| a | b |
+---+---+
| 2 | 3 |
| 3 | 4 |
+---+---+
2 rows in set

What is changed and how it works?

Check List

Tests

  • Unit test

Release note

  • support list default partition

Signed-off-by: crazycs520 <crazycs520@gmail.com>
@tiancaiamao
Copy link
Collaborator

LGTM

Signed-off-by: crazycs520 <crazycs520@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants