-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve conversion of debezium schema to iceberg schema
- Loading branch information
1 parent
768f703
commit b0b8935
Showing
3 changed files
with
27 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
...eberg-sink/src/test/java/io/debezium/server/iceberg/IcebergChangeEventSchemaDataTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package io.debezium.server.iceberg; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
class IcebergChangeEventSchemaDataTest { | ||
|
||
@Test | ||
void nextFieldId() { | ||
|
||
IcebergChangeEventSchemaData test = new IcebergChangeEventSchemaData(5); | ||
test.identifierFieldIds().add(1); | ||
assertEquals(6, test.nextFieldId().incrementAndGet()); | ||
|
||
IcebergChangeEventSchemaData testSubschemaField = test.copyKeepNextFieldId(); | ||
testSubschemaField.nextFieldId().incrementAndGet(); | ||
assertEquals(7, test.nextFieldId().get()); | ||
} | ||
|
||
} |