You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/10/25 01:56:33 UTC
[GitHub] [iceberg] hililiwei opened a new pull request, #6043: Core: Partial Update
hililiwei opened a new pull request, #6043:
URL: https://github.com/apache/iceberg/pull/6043
# Proposal: Partial Updates
## motivation
Take feature engineering as an example, there are thousands or even tens of thousands of columns in the table, but the task will update only a few of them. Currently, if want to update a row, we need to fetch all the columns, which is very inefficient. If we support partial updates, we only need to generate data files with equality and updated columns on write, which greatly improves throughput and reduces complexity ( You do not need to query the values of other columns that do not need to be changed). When reading, we combine the data file with the partial update file, which has some similarities to COR. In addition, to improve the read efficiency, a background asynchronous task can be used to merge files when the system is idle.
### Partial Update Files
Partial updates files identify updated rows in a collection of data files by one or more column values, and includes one or more columns of the updated rows that need to be updated.
Partial updates files store any subset of a table’s columns and use the table’s field ids. The *equality columns* are the columns of the file used to match data rows. The p*artial columns* are columns of the file used to update the specified column of the matching data row.
The partial columns in a data row is updated to the new value if its equality columns values are equal to all equality columns for any row in an partial update file that applies to the row’s data file.
For example, a table with the following data:
```text
1: id | 2: category | 3: name
-------|-------------|---------
1 | marsupial | Koala
2 | toy | Teddy
3 | NULL | Grizzly
4 | NULL | Polar
```
The equality `id = 3` and `name = Lily` could be written as the following partial update files:
```text
equality_ids=[1]
partial_ids=[3]
1: id | 3: name
-------|---------
3 | Lily
```
After applying the partially update file, will have the following data::
```text
1: id | 2: category | 3: name
-------|-------------|---------
1 | marsupial | Koala
2 | toy | Teddy
3 | NULL | Lily
4 | NULL | Polar
```
Illustration:

In this example, we will find the id1 and id3 in the a.file, then update its Col1 to the new value.

In this example, we add a new column to the table and insert a partial update file that contains only the new columns. It might look more like an Insert, except we're inserting new columns for the old row, rather than inserting new rows.
### Brief change log
This PR consists of two parts:
* Evolution of the table format specification, mainly partial update file
* Partial update files Write\Read
P.S. :
This is an internal feature that is under development. I wanted to hear from the community early on, so I raised this PR before it was finished. Of course, there's the engine integration part, but I think this PR is the core part of it, and we should talk about it there first to try and get on the same page.
With this approach, we can solve a large number of business scenarios. Internally, we have implemented it with Flink and achieved satisfactory results in validation.
What is our community's view of it? Hope to receive your feedback.
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Core: Partial Update [iceberg]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #6043: Core: Partial Update
URL: https://github.com/apache/iceberg/pull/6043
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Core: Partial Update [iceberg]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #6043:
URL: https://github.com/apache/iceberg/pull/6043#issuecomment-2342374503
This pull request has been closed due to lack of activity. This is not a judgement on the merit of the PR in any way. It is just a way of keeping the PR queue manageable. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time.
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
[GitHub] [iceberg] pvary commented on pull request #6043: Core: Partial Update
Posted by GitBox <gi...@apache.org>.
pvary commented on PR #6043:
URL: https://github.com/apache/iceberg/pull/6043#issuecomment-1290016237
When we were developing updates for Hive tables, the first version of the ACID implementation was to store only the updated data, which is very similar to the partial updates suggested here.
With ACID V2 we moved away from this solution, because query planning became a serious issue. We had to make sure that every reader read all of the related update files. In situations when all, or most of the data is updated, then these files could become large. The decisions was to move to tombstones which was more predictable performance around the board.
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Core: Partial Update [iceberg]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #6043:
URL: https://github.com/apache/iceberg/pull/6043#issuecomment-2305949182
This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@iceberg.apache.org list. Thank you for your contributions.
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
[GitHub] [iceberg] hililiwei commented on pull request #6043: Core: Partial Update
Posted by GitBox <gi...@apache.org>.
hililiwei commented on PR #6043:
URL: https://github.com/apache/iceberg/pull/6043#issuecomment-1326047860
Thanks @pvary and @lvyanquan for your feedback.
> which is related to the calculation engine, and I look forward to seeing this part of the implemented code.
If you have a large amount of data to update, it may not work, As @pvary says:
> In situations when all, or most of the data is updated, then these files could become large.
In other words, we want to find a more efficient way to achieve partial column updates. So in the short term, it may not take a step forward.
Anyway, we're still working on the integration with engines, but because this solution isn't satisfactory, it's not a high priority, it may take a long time.
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Core: Partial Update [iceberg]
Posted by "lurnagao-dahua (via GitHub)" <gi...@apache.org>.
lurnagao-dahua commented on PR #6043:
URL: https://github.com/apache/iceberg/pull/6043#issuecomment-2613927446
May I ask if you have already implemented some updates internally?
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
[GitHub] [iceberg] lvyanquan commented on pull request #6043: Core: Partial Update
Posted by GitBox <gi...@apache.org>.
lvyanquan commented on PR #6043:
URL: https://github.com/apache/iceberg/pull/6043#issuecomment-1316739131
Our business scenarios often require adding table fields, and the original update method will have a lot of duplicate content. I read and tested these codes, which meet our expectations, but I'm not sure when to write partial update data, which is related to the calculation engine, and I look forward to seeing this part of the implemented code.
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org