Skip to content

Commit

Permalink
address latest rounds of Eduard's comments
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenzwu committed Jun 19, 2024
1 parent 8a3f349 commit 4ef2fb9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions core/src/test/java/org/apache/iceberg/TestDataTaskParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -233,20 +233,20 @@ private String snapshotsDataTaskJson() {
}

private void assertDataTaskEquals(StaticDataTask expected, StaticDataTask actual) {
assertThat(expected.schema().asStruct())
assertThat(actual.schema().asStruct())
.as("Schema should match")
.isEqualTo(actual.schema().asStruct());
.isEqualTo(expected.schema().asStruct());

assertThat(expected.projectedSchema().asStruct())
assertThat(actual.projectedSchema().asStruct())
.as("Projected schema should match")
.isEqualTo(actual.projectedSchema().asStruct());
.isEqualTo(expected.projectedSchema().asStruct());

TestContentFileParser.assertContentFileEquals(
expected.metadataFile(), actual.metadataFile(), PartitionSpec.unpartitioned());

List<StructLike> expectedRows = Lists.newArrayList(expected.rows());
List<StructLike> actualRows = Lists.newArrayList(actual.rows());
assertThat(actualRows).hasSize(expectedRows.size());
assertThat(actualRows).hasSameSizeAs(expectedRows);

// all fields are primitive types or map
Schema schema = expected.schema();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ private static void assertFileScanTaskEquals(
expected.deletes().get(pos), actual.deletes().get(pos), spec);
}

assertThat(expected.schema().sameSchema(actual.schema())).as("Schema should match").isTrue();
assertThat(actual.schema().asStruct()).isEqualTo(expected.schema().asStruct());
assertThat(actual.spec()).isEqualTo(expected.spec());
assertThat(
ExpressionUtil.equivalent(
Expand Down

0 comments on commit 4ef2fb9

Please sign in to comment.