-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Core: Extend V4 DeletionVector with key_metadata field #17438
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,6 +18,7 @@ | |
| */ | ||
| package org.apache.iceberg; | ||
|
|
||
| import java.nio.ByteBuffer; | ||
| import org.apache.iceberg.types.Types; | ||
|
|
||
| /** | ||
|
|
@@ -45,9 +46,15 @@ interface DeletionVector { | |
| "cardinality", | ||
| Types.LongType.get(), | ||
| "Number of set bits (deleted rows) in the vector"); | ||
| Types.NestedField KEY_METADATA = | ||
| Types.NestedField.optional( | ||
| 149, | ||
| "key_metadata", | ||
| Types.BinaryType.get(), | ||
| "Implementation-specific key metadata for encryption"); | ||
|
|
||
| static Types.StructType schema() { | ||
| return Types.StructType.of(LOCATION, OFFSET, SIZE_IN_BYTES, CARDINALITY); | ||
| return Types.StructType.of(LOCATION, OFFSET, SIZE_IN_BYTES, CARDINALITY, KEY_METADATA); | ||
| } | ||
|
|
||
| /** Returns the location of the file containing the deletion vector. */ | ||
|
|
@@ -62,6 +69,9 @@ static Types.StructType schema() { | |
| /** Returns the number of set bits (deleted rows) in the vector. */ | ||
| long cardinality(); | ||
|
|
||
| /** Returns encryption key metadata, or null if the file is not encrypted. */ | ||
| ByteBuffer keyMetadata(); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we need to update the adapter
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I initially figured I just take care of the schema and structure changes and deal with the rest on top later. Since the change in the adapter is minimal, I covered it too as you suggested. Thanks, @anoopj ! |
||
|
|
||
| /** Copies this deletion vector. */ | ||
| DeletionVector copy(); | ||
| } | ||
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.
ColumnFiles PR takes field IDs 158-169. I see 149 is free