You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2021/11/08 22:24:23 UTC
[GitHub] [iceberg] RussellSpitzer commented on a change in pull request #3480: Core: support rewrite data files with starting sequence number
RussellSpitzer commented on a change in pull request #3480:
URL: https://github.com/apache/iceberg/pull/3480#discussion_r745139393
##########
File path: core/src/test/java/org/apache/iceberg/TestRowDelta.java
##########
@@ -1134,4 +1135,121 @@ public void testConcurrentNonConflictingRowDelta() {
validateTableDeleteFiles(table, deleteFile1, deleteFile2);
}
+
+ @Test
+ public void testConcurrentNonConflictingRowDeltaAndRewriteFilesWithSequenceNumber() {
+ // change the spec to be partitioned by data
+ table.updateSpec()
+ .removeField(Expressions.bucket("data", 16))
+ .addField(Expressions.ref("data"))
+ .commit();
+
+ // add a data file to partition A
+ DataFile dataFile1 = DataFiles.builder(table.spec())
+ .withPath("/path/to/data-a.parquet")
+ .withFileSizeInBytes(10)
+ .withPartitionPath("data=a")
+ .withRecordCount(1)
+ .build();
+
+ table.newAppend()
+ .appendFile(dataFile1)
+ .commit();
+
+ Snapshot baseSnapshot = table.currentSnapshot();
+
+ // add an equality delete file
+ DeleteFile deleteFile1 = FileMetadata.deleteFileBuilder(table.spec())
Review comment:
We have some helpers for this (at least with data files)
```newDeleteFile and newDataFile```
In testTableBase
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org