Skip to content

Commit

Permalink
[FLINK-30613][serializer] Migrate LinkedListSerializer to implement n…
Browse files Browse the repository at this point in the history
…ew method of resolving schema compatibility
  • Loading branch information
masteryhx committed Jan 15, 2024
1 parent 8430068 commit 3cf1327
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,14 @@ protected void writeOuterSnapshot(DataOutputView out) throws IOException {

@Override
protected OuterSchemaCompatibility resolveOuterSchemaCompatibility(
LinkedListSerializer<T> newSerializer) {
if (hasNullMask != newSerializer.hasNullMask) {
TypeSerializerSnapshot<LinkedList<T>> oldSerializerSnapshot) {
if (!(oldSerializerSnapshot instanceof LinkedListSerializerSnapshot)) {
return OuterSchemaCompatibility.INCOMPATIBLE;
}

LinkedListSerializerSnapshot<T> oldLinkedListSerializerSnapshot =
(LinkedListSerializerSnapshot<T>) oldSerializerSnapshot;
if (hasNullMask != oldLinkedListSerializerSnapshot.hasNullMask) {
return OuterSchemaCompatibility.COMPATIBLE_AFTER_MIGRATION;
}
return OuterSchemaCompatibility.COMPATIBLE_AS_IS;
Expand Down

0 comments on commit 3cf1327

Please sign in to comment.