zhannngchen commented on code in PR #17367: URL: https://github.com/apache/doris/pull/17367#discussion_r1123975678
########## docs/zh-CN/docs/data-operate/update-delete/batch-delete-manual.md: ########## @@ -243,3 +243,83 @@ curl --location-trusted -u root: -H "column_separator:," -H "columns: siteid, ci +--------+----------+----------+------+ ``` +4. 当存在sequence列时,将与导入数据key 相同的数据全部删除 + +```bash +curl --location-trusted -u root: -H "column_separator:," -H "columns: name, gender, age" -H "function_column.sequence_col: age" -H "merge_type: DELETE" -T ~/table1_data http://127.0.0.1:8130/api/test/table1/_stream_load +``` + +当unique表设置了sequence列时,在相同key列下,sequence列的值会作为REPLACE聚合函数替换顺序的依据,较大值可以替换较小值。 +当对这种表基于`__DORIS_DELETE_SIGN__`进行删除标记时,需要保证key相同和sequence列值要大于等于当前值。 Review Comment: 这里帮忙再补充一下这样设计的逻辑吧:当导入数据中同时存在数据写入和删除时(例如Flink CDC场景中),使用seq列可以有效的保证当数据乱序到达时的一致性,避免后到达的一个旧版本的删除操作,误删掉了先到达的新版本的数据。 -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
