-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[Proposal] Support Dynamic Partition in Doris #2262
Comments
These grammar looks good to me. |
@WingsGo This is a wonderful job, and I have some suggestion about this proposal.
|
I think because doris only support int type , date type and datetime type as partition column, and the minimize time unit is day, what about unify the format as yyyyMMdd? |
What I want to emphasize is that how to parse the content of int type, is there an option to specify this? For example, if users store timestamp value in an int column, it also can be used as a partition column, and the dynamic partition function can be applied to it. And user can also store value like "20190101" in int value. If we intent to support both two types, we should provide an option to user to tell Doris how to parse its value. |
I think you mean that if user store timestamp such as '1546272000000', we should add partition like |
Yes, it is what I mean. If you don't intent to support this this time, it's better to reserve option to support it in the future. |
Background:
In some scenarios, when a user creates an Olap table that is range partition by time, the user needs to periodically add and remove partitions to ensure that the data is valid. As a result, adding and removing partitions dynamically can be very useful for users.
SQL语法
dynamic_partition.time_unit: 用于指定动态添加分区的时间单位,可选择为DAY(天),WEEK(周),MONTH(月)
dynamic_partition.end: 用于指定提前创建的分区数量
dynamic_partition.prefix: 用于指定创建的分区名前缀
dynamic_partition.buckets: 用于指定自动创建的分区分桶数量
Example
If the time to create this table is November 23, 2019, the following partitions will be create automatically
DDL
语法:
ALTER TABLE [database.]table
alter_clause1[, alter_clause2, ...];
alter_clause 分为 partition 、rollup、schema change 、rename 和properties五种。
properties 支持如下几种修改方式
语法:
SET PROPERTIES("key" = "value", ...)
说明:
1)除了支持已有的dynamic_partition属性修改,当前还支持修改动态分区的开启或者关闭属性,例如:ALTER TABLE table_name SET PROPERTIES("dynamic_partition.enable" = "false"");
DML
SHOW DYNAMIC PARTITION TABLES
description
keyword
The text was updated successfully, but these errors were encountered: