Skip to content

Commit

Permalink
[oceanbase] use real charset to convert change record (#2159)
Browse files Browse the repository at this point in the history
  • Loading branch information
whhe committed Jun 2, 2023
1 parent 0f8023d commit 23c20cc
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 139 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,32 +16,13 @@

package com.ververica.cdc.connectors.oceanbase.source;

import com.oceanbase.oms.logmessage.ByteString;
import sun.reflect.generics.reflectiveObjects.NotImplementedException;

import java.io.Serializable;
import java.nio.charset.StandardCharsets;

/**
* Runtime converter that converts objects of OceanBase into objects of Flink Table & SQL internal
* data structures.
*/
public interface OceanBaseDeserializationRuntimeConverter extends Serializable {

default Object convert(Object object) throws Exception {
if (object instanceof ByteString) {
return convertChangeEvent(
((ByteString) object).toString(StandardCharsets.UTF_8.name()));
} else {
return convertSnapshotEvent(object);
}
}

default Object convertSnapshotEvent(Object object) throws Exception {
throw new NotImplementedException();
}

default Object convertChangeEvent(String string) throws Exception {
throw new NotImplementedException();
}
Object convert(Object object) throws Exception;
}
Loading

0 comments on commit 23c20cc

Please sign in to comment.