nastra commented on code in PR #17523:
URL: https://github.com/apache/iceberg/pull/17523#discussion_r4547974734
##########
core/src/test/java/org/apache/iceberg/TestSnapshot.java:
##########
@@ -34,22 +34,88 @@ public class TestSnapshot extends TestBase {
public void snapshotValueMethodsIncludeMetadataFields() {
Snapshot snapshot =
new BaseSnapshot(
- 0, 1, null, 0, DataOperations.APPEND, null, 1, "ml.avro", 10L, 5L,
"key-1");
+ 0 /* sequenceNumber */,
+ 1 /* snapshotId */,
+ null /* parentId */,
+ 0 /* timestampMillis */,
+ DataOperations.APPEND,
+ null /* summary */,
+ 1 /* schemaId */,
+ "ml.avro" /* manifestListLocation */,
+ null /* rootManifest */,
+ 10L /* firstRowId */,
+ 5L /* addedRows */,
+ "key-1" /* keyId */);
Snapshot same =
new BaseSnapshot(
- 0, 1, null, 0, DataOperations.APPEND, null, 1, "ml.avro", 10L, 5L,
"key-1");
+ 0 /* sequenceNumber */,
+ 1 /* snapshotId */,
+ null /* parentId */,
+ 0 /* timestampMillis */,
+ DataOperations.APPEND,
+ null /* summary */,
+ 1 /* schemaId */,
+ "ml.avro" /* manifestListLocation */,
+ null /* rootManifest */,
+ 10L /* firstRowId */,
+ 5L /* addedRows */,
+ "key-1" /* keyId */);
Snapshot differentFirstRowId =
new BaseSnapshot(
- 0, 1, null, 0, DataOperations.APPEND, null, 1, "ml.avro", 11L, 5L,
"key-1");
+ 0 /* sequenceNumber */,
+ 1 /* snapshotId */,
+ null /* parentId */,
+ 0 /* timestampMillis */,
+ DataOperations.APPEND,
+ null /* summary */,
+ 1 /* schemaId */,
+ "ml.avro" /* manifestListLocation */,
+ null /* rootManifest */,
+ 11L /* firstRowId */,
+ 5L /* addedRows */,
+ "key-1" /* keyId */);
Snapshot differentAddedRows =
new BaseSnapshot(
- 0, 1, null, 0, DataOperations.APPEND, null, 1, "ml.avro", 10L, 6L,
"key-1");
+ 0 /* sequenceNumber */,
+ 1 /* snapshotId */,
+ null /* parentId */,
+ 0 /* timestampMillis */,
+ DataOperations.APPEND,
+ null /* summary */,
+ 1 /* schemaId */,
+ "ml.avro" /* manifestListLocation */,
+ null /* rootManifest */,
+ 10L /* firstRowId */,
+ 6L /* addedRows */,
+ "key-1" /* keyId */);
Snapshot differentKeyId =
new BaseSnapshot(
- 0, 1, null, 0, DataOperations.APPEND, null, 1, "ml.avro", 10L, 5L,
"key-2");
+ 0 /* sequenceNumber */,
+ 1 /* snapshotId */,
+ null /* parentId */,
+ 0 /* timestampMillis */,
+ DataOperations.APPEND,
+ null /* summary */,
+ 1 /* schemaId */,
+ "ml.avro" /* manifestListLocation */,
+ null /* rootManifest */,
+ 10L /* firstRowId */,
+ 5L /* addedRows */,
+ "key-2" /* keyId */);
Snapshot withoutMetadataFields =
new BaseSnapshot(
- 0, 1, null, 0, DataOperations.APPEND, null, 1, "ml.avro", null,
null, null);
+ 0 /* sequenceNumber */,
+ 1 /* snapshotId */,
+ null /* parentId */,
+ 0 /* timestampMillis */,
+ DataOperations.APPEND,
+ null /* summary */,
+ 1 /* schemaId */,
+ "ml.avro" /* manifestListLocation */,
+ null /* rootManifest */,
Review Comment:
we should maybe have a test in this class where root manifest is set
--
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]