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 2019/12/19 14:06:16 UTC
[GitHub] [incubator-doris] yyuuttaaoo opened a new issue #2514: Duplicate
data model should support deleting records by column not in DUPLICATE KEY
yyuuttaaoo opened a new issue #2514: Duplicate data model should support deleting records by column not in DUPLICATE KEY
URL: https://github.com/apache/incubator-doris/issues/2514
**Is your feature request related to a problem? Please describe.**
I am not able to delete records by columns not in DUPLICATE KEY. The feature is important to m because I need this to delete some erroneous data. After a data table is created, it is not possible to add an existing column into DUPLICATE KEY. On the contrary, the condition for deletion is quite flexible. Duplicate data model is supposed to record facts and keep all records as-is, so it should support deletion condition on any column.
**Describe the solution you'd like**
The condition clause in delete statement should support filtering on any column, not just ones in DUPLICATE KEY.
**Describe alternatives you've considered**
Another solution could be doris supports add existing column to DUPLICATE KEY.
**Additional context**
CREATE TABLE `fact` (
`project_id_` bigint(20) NULL COMMENT "站点id",
`stat_date_` bigint(20) NULL COMMENT "统计归集日,当前为会话开始时间,精确到天",
...
`load_label__` varchar(256) NULL COMMENT "导入批次号",
...
) ENGINE=OLAP
DUPLICATE KEY(`project_id_`, `stat_date_`, `visitor_id_partition__`, `visitor_id_mod__`, `visitor_id__`, `stat_time_`, `project
_id_partition__`, `stat_month_`, `keep_flag__`)
COMMENT "OLAP"
PARTITION BY RANGE(`stat_month_`, `project_id_partition__`, `keep_flag__`)
...
mysql> delete from fact partition p201912_1002533265_2 where load_label__ = '12345';
ERROR 1064 (HY000): Column[load_label__] is not key column
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org