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

[feature] support partition list #491

Closed
andyli029 opened this issue Sep 23, 2019 · 1 comment
Closed

[feature] support partition list #491

andyli029 opened this issue Sep 23, 2019 · 1 comment
Assignees
Labels
P0 High priority type: feature
Milestone

Comments

@andyli029
Copy link
Contributor

andyli029 commented Sep 23, 2019

Summary

support partition list:
In syntax, it is similar to MySQL partitioning-list
but PARTITION b0 has its meaning: b0 is one variable which represents one backend.

MySQL

CREATE TABLE list (
 c1 INT NOT NULL,
 c2 INT NOT NULL
) PARTITION BY LIST(c1) (
PARTITION p0 VALUES IN (1,4,7),
PARTITION p1 VALUES IN (2,5,8));
	
mysql> insert list values(3,3);
ERROR 1526 (HY000): Table has no partition for value 3

mysql> insert list values(1,1);
Query OK, 1 row affected (0.02 sec)

RadonDB

CREATE TABLE l(
 c1 INT NOT NULL,
 c2 INT NOT NULL
) PARTITION BY LIST(c1) (
PARTITION b0 VALUES IN (1,4,7),
PARTITION b1 VALUES IN (2,5,8));

b0: one backend
b1: another backend

mysql> insert l values(3,3);
ERROR 1526 (HY000): Table has no partition for value 3

mysql> insert l values(1,1);
Query OK, 1 row affected (0.02 sec)
@BohuTANG
Copy link
Contributor

ACK

@andyli029 andyli029 self-assigned this Sep 23, 2019
@andyli029 andyli029 added the P0 High priority label Sep 23, 2019
@andyli029 andyli029 added this to the v1.0.8 milestone Sep 23, 2019
andyli029 added a commit to andyli029/radon that referenced this issue Sep 24, 2019
[summary]
adjust partition to add more type partition
[test case]
router/frm_test.go
[patch codecov]
100%
andyli029 added a commit to andyli029/radon that referenced this issue Sep 24, 2019
[summary]
adjust partition to add more type partition
[test case]
router/frm_test.go
[patch codecov]
100%
BohuTANG pushed a commit that referenced this issue Sep 25, 2019
[summary]
adjust partition to add more type partition
[test case]
router/frm_test.go
[patch codecov]
100%
andyli029 added a commit to andyli029/radon that referenced this issue Oct 31, 2019
[summary]
In syntax, it is similar to MySQL partitioning-list
(https://dev.mysql.com/doc/refman/5.7/en/partitioning-list.html)
but PARTITION b0 has its meaning: b0 represents one backend.

Syntax:
CREATE TABLE l(
 c1 INT NOT NULL,
 c2 INT NOT NULL
) PARTITION BY LIST(c1) (
PARTITION b0 VALUES IN (1,4,7),
PARTITION b1 VALUES IN (2,5,8));

[test case]
src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/ddl_test.go

[patch codecov]
coverage: 87.7% of statements
andyli029 added a commit to andyli029/radon that referenced this issue Oct 31, 2019
[summary]
In syntax, it is similar to MySQL partitioning-list
(https://dev.mysql.com/doc/refman/5.7/en/partitioning-list.html)
but PARTITION b0 has its meaning: b0 represents one backend.

Syntax:
CREATE TABLE l(
 c1 INT NOT NULL,
 c2 INT NOT NULL
) PARTITION BY LIST(c1) (
PARTITION b0 VALUES IN (1,4,7),
PARTITION b1 VALUES IN (2,5,8));

[test case]
src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/ddl_test.go

[patch codecov]
coverage: 87.7% of statements
andyli029 added a commit to andyli029/radon that referenced this issue Oct 31, 2019
…adondb#491

[summary]
add ListValue on the PartitionConfig to the partition list

[test case]
src/config/config_test.go

[patch codecov]
86.5%
andyli029 added a commit to andyli029/radon that referenced this issue Oct 31, 2019
…adondb#491

[summary]
add ListValue on the PartitionConfig to the partition list

[test case]
src/config/config_test.go

[patch codecov]
86.5%
andyli029 added a commit to andyli029/radon that referenced this issue Oct 31, 2019
[summary]
In syntax, it is similar to MySQL partitioning-list
(https://dev.mysql.com/doc/refman/5.7/en/partitioning-list.html)
but PARTITION b0 has its meaning: b0 represents one backend.

Syntax:
CREATE TABLE l(
 c1 INT NOT NULL,
 c2 INT NOT NULL
) PARTITION BY LIST(c1) (
PARTITION b0 VALUES IN (1,4,7),
PARTITION b1 VALUES IN (2,5,8));

[test case]
src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/ddl_test.go

[patch codecov]
coverage: 87.7% of statements
andyli029 added a commit to andyli029/radon that referenced this issue Oct 31, 2019
…adondb#491

[summary]
add ListValue on the PartitionConfig to the partition list

[test case]
src/config/config_test.go

[patch codecov]
86.5%
BohuTANG pushed a commit that referenced this issue Oct 31, 2019
[summary]
In syntax, it is similar to MySQL partitioning-list
(https://dev.mysql.com/doc/refman/5.7/en/partitioning-list.html)
but PARTITION b0 has its meaning: b0 represents one backend.

Syntax:
CREATE TABLE l(
 c1 INT NOT NULL,
 c2 INT NOT NULL
) PARTITION BY LIST(c1) (
PARTITION b0 VALUES IN (1,4,7),
PARTITION b1 VALUES IN (2,5,8));

[test case]
src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/ddl_test.go

[patch codecov]
coverage: 87.7% of statements
andyli029 added a commit to andyli029/radon that referenced this issue Oct 31, 2019
…adondb#491

[summary]
add ListValue on the PartitionConfig to the partition list

[test case]
src/config/config_test.go

[patch codecov]
86.5%
BohuTANG pushed a commit that referenced this issue Oct 31, 2019


[summary]
add ListValue on the PartitionConfig to the partition list

[test case]
src/config/config_test.go

[patch codecov]
86.5%
andyli029 added a commit to andyli029/radon that referenced this issue Nov 1, 2019
andyli029 added a commit to andyli029/radon that referenced this issue Nov 1, 2019
andyli029 added a commit to andyli029/radon that referenced this issue Nov 1, 2019
[summary]
add the interface about partition type

[test case]
src/router/router_test.go

[patch codecov]
100%
BohuTANG pushed a commit that referenced this issue Nov 1, 2019
[summary]
add the interface about partition type

[test case]
src/router/router_test.go

[patch codecov]
100%
andyli029 added a commit to andyli029/radon that referenced this issue Nov 1, 2019
[summary]
router add partition list

[test case]
src/router/compute_test.go
src/router/frm_test.go
src/router/list_test.go
src/router/router_test.go

[patch codecov]
src/router/compute.go 100%
src/router/frm.go 79.1%
src/router/list.go 93.3%
src/router/router.go 93.3%
andyli029 added a commit to andyli029/radon that referenced this issue Nov 1, 2019
[summary]
router add partition list

[test case]
src/router/compute_test.go
src/router/frm_test.go
src/router/list_test.go
src/router/router_test.go

[patch codecov]
src/router/compute.go 100%
src/router/frm.go 79.1%
src/router/list.go 93.3%
src/router/router.go 93.3%
andyli029 added a commit to andyli029/radon that referenced this issue Nov 1, 2019
[summary]
router add partition list

[test case]
src/router/compute_test.go
src/router/frm_test.go
src/router/list_test.go
src/router/router_test.go

[patch codecov]
src/router/compute.go 100%
src/router/frm.go 79.1%
src/router/list.go 93.3%
src/router/router.go 93.3%
andyli029 added a commit to andyli029/radon that referenced this issue Nov 1, 2019
[summary]
router add partition list

[test case]
src/router/compute_test.go
src/router/frm_test.go
src/router/list_test.go
src/router/router_test.go

[patch codecov]
src/router/compute.go 100%
src/router/frm.go 79.1%
src/router/list.go 93.3%
src/router/router.go 93.3%
andyli029 added a commit to andyli029/radon that referenced this issue Nov 1, 2019
[summary]
router add partition list

[test case]
src/router/compute_test.go
src/router/frm_test.go
src/router/list_test.go
src/router/router_test.go

[patch codecov]
src/router/compute.go 100%
src/router/frm.go 79.1%
src/router/list.go 93.3%
src/router/router.go 93.3%
andyli029 added a commit to andyli029/radon that referenced this issue Nov 1, 2019
[summary]
router add partition list

[test case]
src/router/compute_test.go
src/router/frm_test.go
src/router/list_test.go
src/router/router_test.go

[patch codecov]
src/router/compute.go 100%
src/router/frm.go 79.1%
src/router/list.go 93.3%
src/router/router.go 93.3%
andyli029 added a commit to andyli029/radon that referenced this issue Nov 1, 2019
[summary]
router add partition list

[test case]
src/router/compute_test.go
src/router/frm_test.go
src/router/list_test.go
src/router/router_test.go

[patch codecov]
src/router/compute.go 100%
src/router/frm.go 79.1%
src/router/list.go 93.3%
src/router/router.go 93.3%
andyli029 added a commit to andyli029/radon that referenced this issue Nov 1, 2019
[summary]
router add partition list

[test case]
src/router/compute_test.go
src/router/frm_test.go
src/router/list_test.go
src/router/router_test.go

[patch codecov]
src/router/compute.go 100%
src/router/frm.go 79.1%
src/router/list.go 93.3%
src/router/router.go 93.3%
andyli029 added a commit to andyli029/radon that referenced this issue Nov 1, 2019
[summary]
router add partition list

[test case]
src/router/compute_test.go
src/router/frm_test.go
src/router/list_test.go
src/router/router_test.go

[patch codecov]
src/router/compute.go 100%
src/router/frm.go 79.1%
src/router/list.go 93.3%
src/router/router.go 93.3%
andyli029 added a commit to andyli029/radon that referenced this issue Nov 1, 2019
[summary]
router add partition list

[test case]
src/router/compute_test.go
src/router/frm_test.go
src/router/list_test.go
src/router/router_test.go

[patch codecov]
src/router/compute.go 100%
src/router/frm.go 79.1%
src/router/list.go 93.3%
src/router/router.go 93.3%
andyli029 added a commit to andyli029/radon that referenced this issue Nov 7, 2019
[summary]
proxy add partition list
ctl add partition list

[test case]
src/proxy/ddl_test.go
src/ctl/v1/shard_test.go

[patch codecov]
src/proxy/ddl.go 93.6%
src/ctl/v1/shard.go 88.3%
andyli029 added a commit to andyli029/radon that referenced this issue Nov 7, 2019
[summary]
proxy add partition list
ctl add partition list

[test case]
src/proxy/ddl_test.go
src/ctl/v1/shard_test.go

[patch codecov]
src/proxy/ddl.go 93.6%
src/ctl/v1/shard.go 88.3%
andyli029 added a commit to andyli029/radon that referenced this issue Nov 8, 2019
[summary]
proxy add partition list
ctl add partition list

[test case]
src/proxy/ddl_test.go
src/ctl/v1/shard_test.go

[patch codecov]
src/proxy/ddl.go 93.6%
src/ctl/v1/shard.go 88.3%
andyli029 added a commit to andyli029/radon that referenced this issue Nov 8, 2019
[summary]
proxy add partition list
ctl add partition list

[test case]
src/proxy/ddl_test.go
src/ctl/v1/shard_test.go

[patch codecov]
src/proxy/ddl.go 93.6%
src/ctl/v1/shard.go 88.3%
andyli029 added a commit to andyli029/radon that referenced this issue Nov 8, 2019
[summary]
proxy add partition list
ctl add partition list

[test case]
src/proxy/ddl_test.go
src/ctl/v1/shard_test.go

[patch codecov]
src/proxy/ddl.go 93.6%
src/ctl/v1/shard.go 89%
andyli029 added a commit to andyli029/radon that referenced this issue Nov 8, 2019
[summary]
proxy add partition list
ctl add partition list

[test case]
src/proxy/ddl_test.go
src/ctl/v1/shard_test.go

[patch codecov]
src/proxy/ddl.go 93.6%
src/ctl/v1/shard.go 89%
andyli029 added a commit to andyli029/radon that referenced this issue Nov 8, 2019
[summary]
proxy add partition list
ctl add partition list

[test case]
src/proxy/ddl_test.go
src/ctl/v1/shard_test.go

[patch codecov]
src/proxy/ddl.go 93.6%
src/ctl/v1/shard.go 89%
BohuTANG pushed a commit that referenced this issue Nov 9, 2019
[summary]
proxy add partition list
ctl add partition list

[test case]
src/proxy/ddl_test.go
src/ctl/v1/shard_test.go

[patch codecov]
src/proxy/ddl.go 93.6%
src/ctl/v1/shard.go 89%
andyli029 added a commit to andyli029/radon that referenced this issue Nov 15, 2019
[summary]
add partition list to show create table
[test case]
src/proxy/show_test.go
[patch codecov]
src/proxy/show.go 88.1%
andyli029 added a commit to andyli029/radon that referenced this issue Nov 15, 2019
[summary]
add partition list to show create table
[test case]
src/proxy/show_test.go
[patch codecov]
src/proxy/show.go 88.1%
andyli029 added a commit to andyli029/radon that referenced this issue Nov 15, 2019
[summary]
add partition list to show create table
[test case]
src/proxy/show_test.go
[patch codecov]
src/proxy/show.go 88.1%
andyli029 added a commit to andyli029/radon that referenced this issue Nov 15, 2019
[summary]
add partition list to show create table
[test case]
src/proxy/show_test.go
[patch codecov]
src/proxy/show.go 88.1%
andyli029 added a commit to andyli029/radon that referenced this issue Nov 15, 2019
[summary]
add partition list to docs
[test case]
N/A
[patch codecov]
N/A
andyli029 added a commit to andyli029/radon that referenced this issue Nov 15, 2019
[summary]
add partition list to docs
[test case]
N/A
[patch codecov]
N/A
andyli029 added a commit to andyli029/radon that referenced this issue Nov 15, 2019
[summary]
add partition list to docs
[test case]
N/A
[patch codecov]
N/A
andyli029 added a commit to andyli029/radon that referenced this issue Nov 15, 2019
[summary]
add partition list to docs
[test case]
N/A
[patch codecov]
N/A
andyli029 added a commit to andyli029/radon that referenced this issue Nov 15, 2019
[summary]
add partition list to docs
[test case]
N/A
[patch codecov]
N/A
andyli029 added a commit to andyli029/radon that referenced this issue Nov 15, 2019
[summary]
add partition list to docs
[test case]
N/A
[patch codecov]
N/A
BohuTANG pushed a commit that referenced this issue Nov 16, 2019
[summary]
add partition list to show create table
[test case]
src/proxy/show_test.go
[patch codecov]
src/proxy/show.go 88.1%
BohuTANG pushed a commit that referenced this issue Nov 17, 2019
[summary]
add partition list to docs
[test case]
N/A
[patch codecov]
N/A
zhyass pushed a commit to zhyass/radon that referenced this issue Dec 11, 2019
[summary]
In syntax, it is similar to MySQL partitioning-list
(https://dev.mysql.com/doc/refman/5.7/en/partitioning-list.html)
but PARTITION b0 has its meaning: b0 represents one backend.

Syntax:
CREATE TABLE l(
 c1 INT NOT NULL,
 c2 INT NOT NULL
) PARTITION BY LIST(c1) (
PARTITION b0 VALUES IN (1,4,7),
PARTITION b1 VALUES IN (2,5,8));

[test case]
src/vendor/github.com/xelabs/go-mysqlstack/sqlparser/ddl_test.go

[patch codecov]
coverage: 87.7% of statements
zhyass pushed a commit to zhyass/radon that referenced this issue Dec 11, 2019
…adondb#491

[summary]
add ListValue on the PartitionConfig to the partition list

[test case]
src/config/config_test.go

[patch codecov]
86.5%
zhyass pushed a commit to zhyass/radon that referenced this issue Dec 11, 2019
[summary]
add the interface about partition type

[test case]
src/router/router_test.go

[patch codecov]
100%
zhyass pushed a commit to zhyass/radon that referenced this issue Dec 11, 2019
[summary]
router add partition list

[test case]
src/router/compute_test.go
src/router/frm_test.go
src/router/list_test.go
src/router/router_test.go

[patch codecov]
src/router/compute.go 100%
src/router/frm.go 79.1%
src/router/list.go 93.3%
src/router/router.go 93.3%
zhyass pushed a commit to zhyass/radon that referenced this issue Dec 11, 2019
[summary]
planner add partition list

[test case]
src/planner/builder/builder_test.go
src/planner/builder/from_test.go

[patch codecov]
src/planner/builder/builder.go 96.1%
src/planner/builder/join_node.go 90.6%
zhyass pushed a commit to zhyass/radon that referenced this issue Dec 11, 2019
[summary]
proxy add partition list
ctl add partition list

[test case]
src/proxy/ddl_test.go
src/ctl/v1/shard_test.go

[patch codecov]
src/proxy/ddl.go 93.6%
src/ctl/v1/shard.go 89%
zhyass pushed a commit to zhyass/radon that referenced this issue Dec 11, 2019
[summary]
add partition list to show create table
[test case]
src/proxy/show_test.go
[patch codecov]
src/proxy/show.go 88.1%
zhyass pushed a commit to zhyass/radon that referenced this issue Dec 11, 2019
[summary]
add partition list to docs
[test case]
N/A
[patch codecov]
N/A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P0 High priority type: feature
Projects
None yet
Development

No branches or pull requests

2 participants