matrixorigin / matrixone

Hyperconverged cloud-edge native database
https://docs.matrixorigin.cn/en
Apache License 2.0
1.78k stars 276 forks source link

[Feature Request]: INSERT into PARTITION #6577

Open dengn opened 1 year ago

dengn commented 1 year ago

Is there an existing issue for the same feature request?

Is your feature request related to a problem?

No response

Describe the feature you'd like

Follow MySQL 8.0 syntax and behavior. https://dev.mysql.com/doc/refman/8.0/en/partitioning-selection.html

CREATE TABLE `customer_login_log` (
    `customer_id` int(10) unsigned NOT NULL,
    `login_time` DATETIME NOT NULL,
    `login_ip` int(10) unsigned NOT NULL,
    `login_type` tinyint(4) NOT NULL
) 
PARTITION BY RANGE (YEAR(login_time))(
    PARTITION p0 VALUES LESS THAN (2017),
    PARTITION p1 VALUES LESS THAN (2018),
    PARTITION p2 VALUES LESS THAN (2019)
);

INSERT INTO customer_login_log PARTITION (p2) (customer_id , login_time , login_ip , login_type) VALUES (1001 , '2018-03-11' ,0,1),(1001 , '2018-07-15' ,0,1);

Describe implementation you've considered

No response

Documentation, Adoption, Use Case, Migration Strategy

No response

Additional information

No response

fengttt commented 1 year ago

Partition design is not finalized yet.

fengttt commented 1 year ago

not a valid feature, wont fix.