-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve code, Improve class and method namings (#410)
* Rename IcebergChangeEvent to RecordConverter * Rename ChangeEventSchema to SchemaConverter * Rename changeEventSchema() to schemaConverter() * Rename asIcebergRecord(Schema schema) to convert(Schema schema) * Rename IcebergChangeEventSchemaData to RecordSchemaData * Rename cdcOperations to CDC_OPERATION_PRIORITY * Rename opFieldName to cdcOpField and sourceTsMsColumn to cdcSourceTsMsField
- Loading branch information
1 parent
6e553bb
commit a7f541c
Showing
15 changed files
with
130 additions
and
150 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
28 changes: 0 additions & 28 deletions
28
...r-iceberg-sink/src/main/java/io/debezium/server/iceberg/IcebergChangeEventSchemaData.java
This file was deleted.
Oops, something went wrong.
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
28 changes: 28 additions & 0 deletions
28
debezium-server-iceberg-sink/src/main/java/io/debezium/server/iceberg/RecordSchemaData.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,28 @@ | ||
package io.debezium.server.iceberg; | ||
|
||
import org.apache.iceberg.types.Types; | ||
|
||
import java.util.ArrayList; | ||
import java.util.HashSet; | ||
import java.util.List; | ||
import java.util.Set; | ||
import java.util.concurrent.atomic.AtomicInteger; | ||
|
||
record RecordSchemaData(List<Types.NestedField> fields, Set<Integer> identifierFieldIds, | ||
AtomicInteger nextFieldId) { | ||
|
||
|
||
public RecordSchemaData(Integer nextFieldId) { | ||
this(new ArrayList<>(), new HashSet<>(), new AtomicInteger(nextFieldId)); | ||
} | ||
|
||
public RecordSchemaData() { | ||
this(new ArrayList<>(), new HashSet<>(), new AtomicInteger(1)); | ||
} | ||
|
||
public RecordSchemaData copyKeepIdentifierFieldIdsAndNextFieldId() { | ||
return new RecordSchemaData(new ArrayList<>(), this.identifierFieldIds, this.nextFieldId); | ||
} | ||
|
||
|
||
} |
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
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
Oops, something went wrong.