imay commented on issue #4051: URL: https://github.com/apache/incubator-doris/issues/4051#issuecomment-666958042
> It can be done in some other new data model in future. Changing the current data model to "Copy-on-Write" is a very costly thing. Having you any idea about it? We can do it by add delete flag for old rows when doing delete operation. > Actually, I think the value column can be filled by some dummy placeholder values. And user can also specify the column mappings in `columns` properties to specified the key columns, and the missing value columns can either will filled by default value automatically, or filled by user manually. Now, in one Load job, there are inserted rows and deleted rows, columns mapping works for all of them. Which means loaded rows and delete rows should have the same number of columns. > Oh, I forgot, uniq key is also a kind of aggr key model, so this can be performed on aggr key model in some scenarios. It is just like `DELETE FROM` method that system will check if all key columns exists in rollups or materialized views. Because all columns should be given in Load, actually all the delete will be disabled for aggregate model. > Duplicate key model is not within our consideration. Cause we do not found a good way to handle this model. > First of all, the main purpose of this delete function is to receive the data changes of the TP system captured by the CDC system. The data in the TP system usually has the concept of a primary key. And many CDC systems or data transmission systems themselves also require data to have a primary key, otherwise effective incremental data capture cannot be performed. In my opinion, duplicate key is not a data model for strict CRUD scenarios. Actually, when you create a MySQL table, there is no primary key. And primary key is just a constraint, it is OK to delete/update rows for a table without primary key. And what's more, if we support this scheme for deletion, how can we support standard SQL delete syntax. ---------------------------------------------------------------- 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org