-
Notifications
You must be signed in to change notification settings - Fork 3k
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 Iceberg merge, update, delete, for tables with equality deletes #24062
base: master
Are you sure you want to change the base?
Conversation
b87430a
to
a080a7a
Compare
Update row id was replaced with merge row id
Rewrite the creation of merge row id to avoid duplicate key exception. This also simplifies and consolidates the merge row id code.
a080a7a
to
dddde02
Compare
@@ -42,8 +42,7 @@ public class IcebergColumnHandle | |||
private static final int INSTANCE_SIZE = instanceSize(IcebergColumnHandle.class); | |||
|
|||
// Iceberg reserved row ids begin at INTEGER.MAX_VALUE and count down. Starting with MIN_VALUE here to avoid conflicts. | |||
public static final int TRINO_UPDATE_ROW_ID = Integer.MIN_VALUE; | |||
public static final int TRINO_MERGE_ROW_ID = Integer.MIN_VALUE + 1; | |||
public static final int TRINO_MERGE_ROW_ID = Integer.MIN_VALUE; | |||
public static final String TRINO_ROW_ID_NAME = "$row_id"; | |||
|
|||
public static final int TRINO_MERGE_PARTITION_SPEC_ID = Integer.MIN_VALUE + 2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can likely adjust the values (decrease by 1) of the other ID fields now that we don't have anymore Integer.MIN_VALUE + 1
@@ -72,20 +72,13 @@ public IcebergPageSource( | |||
|
|||
if (expectedColumn.isMergeRowIdColumn()) { | |||
this.rowIdColumnIndex = i; | |||
|
|||
Map<Integer, Integer> fieldIdToColumnIndex = mapFieldIdsToIndex(requiredColumns); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mapFieldIdsToIndex
function is not used anymore.
Description
Fixes #15952
Superseeds #16216
Release notes
(x) Release notes are required, with the following suggested text: