Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix failure when equality delete updated nested fields in Iceberg #24512

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ebyhr
Copy link
Member

@ebyhr ebyhr commented Dec 18, 2024

Description

Fixes #18625

Release notes

## Iceberg
* Fix failure when reading tables which equality deletes updated nested fields. ({issue}`18625`)

@cla-bot cla-bot bot added the cla-signed label Dec 18, 2024
@github-actions github-actions bot added the iceberg Iceberg connector label Dec 18, 2024
@findinpath findinpath requested review from mdesmet and pajaks December 18, 2024 12:57
@ebyhr ebyhr force-pushed the ebi/iceberg-nested-field branch 2 times, most recently from 73516cb to ff29353 Compare December 23, 2024 10:08
@ebyhr ebyhr removed the request for review from mdesmet January 7, 2025 01:18
@ebyhr ebyhr force-pushed the ebi/iceberg-nested-field branch from ff29353 to 15f60de Compare January 7, 2025 01:23
@ebyhr ebyhr marked this pull request as ready for review January 7, 2025 01:24
@ebyhr ebyhr requested a review from raunaqmorarka January 7, 2025 01:24
@raunaqmorarka raunaqmorarka requested a review from dain January 8, 2025 07:51
@ebyhr ebyhr force-pushed the ebi/iceberg-nested-field branch from 15f60de to 1757e4d Compare January 10, 2025 03:24
{
int positionCount = page.getPositionCount();
int[] retained = new int[positionCount];
int retainedCount = 0;
for (int position = 0; position < positionCount; position++) {
if (test(page, position)) {
Page selectedPage = columns.length == 0 ? page : page.getColumns(columns);
if (test(selectedPage, position)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we extract a subset of columns as input to test, then does it break assumptions about block index in the implementations ? E.g. in io.trino.plugin.iceberg.delete.PositionDeleteFilter#createPredicate we have page.getBlock(filePosChannel) and that can select different column if we pass in a subset of blocks of the page.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if I fully understand your concern. List<IcebergColumnHandle> columns argument in PositionDeleteFilter#createPredicate is also adjusted in this PR. https://github.com/trinodb/trino/pull/24512/files#diff-705548e3717786bbc076aba181f1eca081ec69200050c18100bfa959e05095dfR357

@ebyhr ebyhr force-pushed the ebi/iceberg-nested-field branch from 1757e4d to b567ebc Compare January 15, 2025 03:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed iceberg Iceberg connector
Development

Successfully merging this pull request may close these issues.

Read iceberg v2 table which has equality deletes with nested fields failed
2 participants