You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/12/30 04:45:38 UTC

[GitHub] [doris] ByteYue opened a new issue, #15507: [Feature] support default partition for list partition when creating table

ByteYue opened a new issue, #15507:
URL: https://github.com/apache/doris/issues/15507

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no similar issues.
   
   
   ### Description
   
   There is currently no default partition for list partition. Other DBMS system like GreenPlum supports such [feature](https://gpdb.docs.pivotal.io/6-5/admin_guide/ddl/ddl-partition.html#topic80) that user can create one table using stmt as follows.
   
   ```sql
   CREATE TABLE rank (id int, rank int, year int, gender 
   char(1), count int ) 
   DISTRIBUTED BY (id)
   PARTITION BY LIST (gender)
   ( PARTITION girls VALUES ('F'), 
     PARTITION boys VALUES ('M'), 
     DEFAULT PARTITION other );
   ```
   
   I'd like Doris could support one default list partition implementation similar to GreenPlum's.
   For data loading: 
   > If incoming data does not match a partition's CHECK constraint and there is no default partition, the data is rejected. Default partitions ensure that incoming data that does not match a partition is inserted into the default partition.
    
   For query:
   > At runtime, the query optimizer scans the entire table inheritance hierarchy and uses the CHECK table constraints to determine which of the child table partitions to scan to satisfy the query's conditions. The DEFAULT partition (if your hierarchy has one) is always scanned. DEFAULT partitions that contain data slow down the overall scan time.
   
   And there exists such occasion where user might at first insert some not satisfying prior partition key data into the table and now create one new partition. It's user's responsibility to migrate the data satisfying new partition's key in default partition to new partition. 
   
   As for the range default partition, i'll leave it as one future work.
   
   
   ### Use case
   
   It would be annoying for users who want to migrate from system supporting default partition like GreenPlum that they have to change their DDL or even worse they can't meet their business requirements which prefer storing all data even not satisfying prior partition key. For those users we can implement such feature which would help a lot. 
   
   ### Related issues
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] morningman closed issue #15507: [Feature] support default partition for list partition when creating table

Posted by "morningman (via GitHub)" <gi...@apache.org>.
morningman closed issue #15507: [Feature] support default partition for list partition when creating table
URL: https://github.com/apache/doris/issues/15507


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org