This is an automated email from the ASF dual-hosted git repository.
fokko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iceberg.git
The following commit(s) were added to refs/heads/master by this push:
new 036cef946e Spec: Inconsistency around files_count (#5338)
036cef946e is described below
commit 036cef946eb0f006a3d8c2e8397bf3c149d9ac0c
Author: Fokko Driesprong <[email protected]>
AuthorDate: Thu Oct 5 21:51:37 2023 +0200
Spec: Inconsistency around files_count (#5338)
---
.../main/java/org/apache/iceberg/ManifestFile.java | 6 ++---
.../apache/iceberg/TestManifestListVersions.java | 26 ++++++++++------------
2 files changed, 15 insertions(+), 17 deletions(-)
diff --git a/api/src/main/java/org/apache/iceberg/ManifestFile.java
b/api/src/main/java/org/apache/iceberg/ManifestFile.java
index 7581538d87..ee38a6d414 100644
--- a/api/src/main/java/org/apache/iceberg/ManifestFile.java
+++ b/api/src/main/java/org/apache/iceberg/ManifestFile.java
@@ -52,11 +52,11 @@ public interface ManifestFile {
optional(
503, "added_snapshot_id", Types.LongType.get(), "Snapshot ID that
added the manifest");
Types.NestedField ADDED_FILES_COUNT =
- optional(504, "added_data_files_count", Types.IntegerType.get(), "Added
entry count");
+ optional(504, "added_files_count", Types.IntegerType.get(), "Added entry
count");
Types.NestedField EXISTING_FILES_COUNT =
- optional(505, "existing_data_files_count", Types.IntegerType.get(),
"Existing entry count");
+ optional(505, "existing_files_count", Types.IntegerType.get(), "Existing
entry count");
Types.NestedField DELETED_FILES_COUNT =
- optional(506, "deleted_data_files_count", Types.IntegerType.get(),
"Deleted entry count");
+ optional(506, "deleted_files_count", Types.IntegerType.get(), "Deleted
entry count");
Types.NestedField ADDED_ROWS_COUNT =
optional(512, "added_rows_count", Types.LongType.get(), "Added rows
count");
Types.NestedField EXISTING_ROWS_COUNT =
diff --git
a/core/src/test/java/org/apache/iceberg/TestManifestListVersions.java
b/core/src/test/java/org/apache/iceberg/TestManifestListVersions.java
index a95379e4ca..5b8df081c3 100644
--- a/core/src/test/java/org/apache/iceberg/TestManifestListVersions.java
+++ b/core/src/test/java/org/apache/iceberg/TestManifestListVersions.java
@@ -163,12 +163,11 @@ public class TestManifestListVersions {
Assert.assertEquals("Length", LENGTH, generic.get("manifest_length"));
Assert.assertEquals("Spec id", SPEC_ID, generic.get("partition_spec_id"));
Assert.assertEquals("Snapshot id", SNAPSHOT_ID, (long)
generic.get("added_snapshot_id"));
+ Assert.assertEquals("Added files count", ADDED_FILES, (int)
generic.get("added_files_count"));
Assert.assertEquals(
- "Added files count", ADDED_FILES, (int)
generic.get("added_data_files_count"));
+ "Existing files count", EXISTING_FILES, (int)
generic.get("existing_files_count"));
Assert.assertEquals(
- "Existing files count", EXISTING_FILES, (int)
generic.get("existing_data_files_count"));
- Assert.assertEquals(
- "Deleted files count", DELETED_FILES, (int)
generic.get("deleted_data_files_count"));
+ "Deleted files count", DELETED_FILES, (int)
generic.get("deleted_files_count"));
Assert.assertEquals("Added rows count", ADDED_ROWS, (long)
generic.get("added_rows_count"));
Assert.assertEquals(
"Existing rows count", EXISTING_ROWS, (long)
generic.get("existing_rows_count"));
@@ -191,12 +190,11 @@ public class TestManifestListVersions {
Assert.assertEquals("Length", LENGTH, generic.get("manifest_length"));
Assert.assertEquals("Spec id", SPEC_ID, generic.get("partition_spec_id"));
Assert.assertEquals("Snapshot id", SNAPSHOT_ID, (long)
generic.get("added_snapshot_id"));
+ Assert.assertEquals("Added files count", ADDED_FILES, (int)
generic.get("added_files_count"));
Assert.assertEquals(
- "Added files count", ADDED_FILES, (int)
generic.get("added_data_files_count"));
- Assert.assertEquals(
- "Existing files count", EXISTING_FILES, (int)
generic.get("existing_data_files_count"));
+ "Existing files count", EXISTING_FILES, (int)
generic.get("existing_files_count"));
Assert.assertEquals(
- "Deleted files count", DELETED_FILES, (int)
generic.get("deleted_data_files_count"));
+ "Deleted files count", DELETED_FILES, (int)
generic.get("deleted_files_count"));
Assert.assertEquals("Added rows count", ADDED_ROWS, (long)
generic.get("added_rows_count"));
Assert.assertEquals(
"Existing rows count", EXISTING_ROWS, (long)
generic.get("existing_rows_count"));
@@ -218,9 +216,9 @@ public class TestManifestListVersions {
"manifest_length",
"partition_spec_id",
"added_snapshot_id",
- "added_data_files_count",
- "existing_data_files_count",
- "deleted_data_files_count",
+ "added_files_count",
+ "existing_files_count",
+ "deleted_files_count",
"partitions");
Schema schemaWithoutRowStats =
V1Metadata.MANIFEST_LIST_SCHEMA.select(columnNamesWithoutRowStats);
@@ -241,9 +239,9 @@ public class TestManifestListVersions {
.set("manifest_length", 1024L)
.set("partition_spec_id", 1)
.set("added_snapshot_id", 100L)
- .set("added_data_files_count", 2)
- .set("existing_data_files_count", 3)
- .set("deleted_data_files_count", 4)
+ .set("added_files_count", 2)
+ .set("existing_files_count", 3)
+ .set("deleted_files_count", 4)
.set("partitions", null)
.build();
appender.add(withoutRowStats);