rdblue commented on code in PR #3432: URL: https://github.com/apache/iceberg/pull/3432#discussion_r841286428
########## site/docs/row-level-deletes.md: ########## @@ -0,0 +1,190 @@ +<!-- + - Licensed to the Apache Software Foundation (ASF) under one or more + - contributor license agreements. See the NOTICE file distributed with + - this work for additional information regarding copyright ownership. + - The ASF licenses this file to You under the Apache License, Version 2.0 + - (the "License"); you may not use this file except in compliance with + - the License. You may obtain a copy of the License at + - + - http://www.apache.org/licenses/LICENSE-2.0 + - + - Unless required by applicable law or agreed to in writing, software + - distributed under the License is distributed on an "AS IS" BASIS, + - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + - See the License for the specific language governing permissions and + - limitations under the License. + --> + +# Row-Level Deletes + +Iceberg supports metadata-based deletion through the `DeleteFiles` interface. +It allows you to quickly delete a specific file or any file that might match a given expression without the need to read or write any data in the table. + +Row-level deletes target more complicated use cases such as general data protection regulation (GDPR). +Copy-on-write and merge-on-read are two different approaches to handle row-level delete operations. Here are their definitions in Iceberg: + +- **copy-on-write**: a delete directly rewrites all the affected data files. +- **merge-on-read**: delete information is encoded in the form of _delete files_. The table reader can apply all delete information at read time. + +Overall, copy-on-write is more efficient in reading data, whereas merge-on-read is more efficient in writing deletes, but requires more maintenance and tuning to be performant in reading data with deletes. Review Comment: I think this is too vague. What does "requires more maintenance and tuning to be performant" mean? How about: > The eager approach requires the least amount of work for readers, but frequent changes can become expensive if the same files are rewritten over and over. The lazy approach is the quickest way to complete the write operation, but requires work to remove deleted rows at read time that can cause queries to slow down if there are too many deletes to apply. Both approaches are useful and use cases often combine them. -- 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: dev-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org