Skip to content

Commit b685b0a

Browse files
committed
Upgrade Iceberg versions with per-engine compatibility modules
1 parent 7ba51cd commit b685b0a

244 files changed

Lines changed: 44783 additions & 37 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

amoro-format-iceberg/src/test/java/org/apache/amoro/optimizing/IcebergRewriteExecutorTest.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,20 @@
6565

6666
@RunWith(Parameterized.class)
6767
public class IcebergRewriteExecutorTest extends TableTestBase {
68+
private static final int POSITION_DELETE_FILE_PATH_ID = 2147483546;
69+
private static final int POSITION_DELETE_POS_ID = 2147483545;
6870

6971
private final FileFormat fileFormat;
7072

7173
private RewriteFilesInput scanTask;
7274

7375
private RewriteFilesInput dataScanTask;
7476

77+
// When GenericParquetReaders.buildReader() is called with a schema containing _file / _pos,
78+
// the TypeWithSchemaVisitor in Iceberg does strict schema matching against the Parquet file
79+
// schema
7580
private final Schema posSchema =
76-
new Schema(MetadataColumns.FILE_PATH, MetadataColumns.ROW_POSITION);
81+
new Schema(MetadataColumns.DELETE_FILE_PATH, MetadataColumns.DELETE_FILE_POS);
7782

7883
public IcebergRewriteExecutorTest(boolean hasPartition, FileFormat fileFormat) {
7984
super(
@@ -109,6 +114,9 @@ private StructLike getPartitionData() {
109114

110115
@Before
111116
public void initDataAndReader() throws IOException {
117+
Assert.assertEquals(POSITION_DELETE_FILE_PATH_ID, MetadataColumns.DELETE_FILE_PATH.fieldId());
118+
Assert.assertEquals(POSITION_DELETE_POS_ID, MetadataColumns.DELETE_FILE_POS.fieldId());
119+
112120
StructLike partitionData = getPartitionData();
113121
OutputFileFactory outputFileFactory =
114122
OutputFileFactory.builderFor(getMixedTable().asUnkeyedTable(), 0, 1)

0 commit comments

Comments
 (0)