-
Notifications
You must be signed in to change notification settings - Fork 3k
Core: Add delete marker metadata column #2538
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
880fad1
078f0d3
cb9a640
2029b32
3e284b2
bf7d7ad
ed0b04d
f290240
3380c7d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -53,7 +53,6 @@ | |
| import org.apache.iceberg.io.FileAppender; | ||
| import org.apache.iceberg.io.FileAppenderFactory; | ||
| import org.apache.iceberg.relocated.com.google.common.base.Preconditions; | ||
| import org.apache.iceberg.relocated.com.google.common.collect.HashMultiset; | ||
| import org.apache.iceberg.relocated.com.google.common.collect.ImmutableMap; | ||
| import org.apache.iceberg.relocated.com.google.common.collect.Lists; | ||
| import org.apache.iceberg.types.Types; | ||
|
|
@@ -191,9 +190,19 @@ public static void assertTableRows(Table table, List<RowData> expected) throws I | |
|
|
||
| public static void assertTableRecords(Table table, List<Record> expected) throws IOException { | ||
| table.refresh(); | ||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we need this change? is it because two sets don't match after we add the additional metadata column? but wouldn't
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because the metadata column projection logic produces additional columns even when the The failed unit test contains only equality delete which produces only
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I also find this suspicious. Is the extra column in the expected records or the table? I don't think that this PR should change the data produced by
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is in expected records. The extra column is added in |
||
| Types.StructType type = table.schema().asStruct(); | ||
| StructLikeSet expectedSet = StructLikeSet.create(type); | ||
| expectedSet.addAll(expected); | ||
|
|
||
| try (CloseableIterable<Record> iterable = IcebergGenerics.read(table).build()) { | ||
| Assert.assertEquals("Should produce the expected record", | ||
| HashMultiset.create(expected), HashMultiset.create(iterable)); | ||
| StructLikeSet actualSet = StructLikeSet.create(type); | ||
|
|
||
| for (Record record : iterable) { | ||
| actualSet.add(record); | ||
| } | ||
|
|
||
| Assert.assertEquals("Should produce the expected record", expectedSet, actualSet); | ||
| } | ||
| } | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.