gaborkaszab commented on code in PR #17533:
URL: https://github.com/apache/iceberg/pull/17533#discussion_r3740541743


##########
format/spec.md:
##########
@@ -1209,15 +1207,16 @@ many statistics files associated with different table 
snapshots.
 
 Statistics files metadata within `statistics` table metadata field is a struct 
with the following fields:
 
-=== "v1 - v3"
-    | v1         | v2 and v3  | Field name                      | Type         
         | Description |
-    | ---------- | ---------- 
|---------------------------------|-----------------------|-------------|
-    | _required_ | _required_ | **`snapshot-id`**               | `long`       
         | ID of the Iceberg table's snapshot the statistics file is associated 
with. |
-    | _required_ | _required_ | **`statistics-path`**           | `string`     
         | Path of the statistics file. See [Puffin file 
format](puffin-spec.md). |
-    | _required_ | _required_ | **`file-size-in-bytes`**        | `long`       
         | Size of the statistics file. |
-    | _required_ | _required_ | **`file-footer-size-in-bytes`** | `long`       
         | Total size of the statistics file's footer (not the footer payload 
size). See [Puffin file format](puffin-spec.md) for footer definition. |
-    | _optional_ | _optional_ | **`key-metadata`**              |              
         | Base64-encoded implementation-specific key metadata for encryption. |
-    | _required_ | _required_ | **`blob-metadata`**             | `list<blob 
metadata>` (see below) | A list of the blob metadata for statistics contained 
in the file with structure described below. |
+=== "v1 - v4"
+    | v1 and v2  | v3         | v4         | Field name                      | 
Type                  | Description |
+    | ---------- | ---------- | ---------- 
|---------------------------------|-----------------------|-------------|
+    | _required_ | _required_ | _required_ | **`snapshot-id`**               | 
`long`                | ID of the Iceberg table's snapshot the statistics file 
is associated with. |
+    | _required_ | _required_ | _required_ | **`statistics-path`**           | 
`string`              | Path of the statistics file. See [Puffin file 
format](puffin-spec.md). |
+    | _required_ | _required_ | _required_ | **`file-size-in-bytes`**        | 
`long`                | Size of the statistics file. |
+    | _required_ | _required_ | _required_ | **`file-footer-size-in-bytes`** | 
`long`                | Total size of the statistics file's footer (not the 
footer payload size). See [Puffin file format](puffin-spec.md) for footer 
definition. |
+    | _optional_ | _optional_ |            | ~~**`key-metadata`**~~          | 
                      | Base64-encoded implementation-specific key metadata for 
encryption. (**Deprecated**: use `key-id` instead) |
+    | _optional_ | _optional_ | _optional_ | **`key-id`**                    | 
`string`              | ID of the encryption key that encrypts the statistics 
file key metadata |

Review Comment:
   This is not the MLK's encryption key.
   In my understanding `TableMetadata.encryptionKeys` contains the following 
types of encrypted keys:
   1) The table's encryption key that is used to encrypt all the other keys in 
the list (KEK)
   2) The encryption keys used for encrypting manifest lists
   3) The encryption keys used for encrypting snapshot files (this is newly 
introduced in https://github.com/apache/iceberg/pull/17417)
   
   In this case this `key-id` refers to a particular encrypted key for type 3)
   
   If my understanding is incorrect, please let me know.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to