JNSimba commented on code in PR #33:
URL:
https://github.com/apache/incubator-doris-flink-connector/pull/33#discussion_r891980901
##########
flink-doris-connector/src/main/java/org/apache/doris/flink/sink/writer/RowDataSerializer.java:
##########
@@ -33,36 +34,32 @@
import static
org.apache.doris.flink.sink.writer.LoadConstants.DORIS_DELETE_SIGN;
import static org.apache.doris.flink.sink.writer.LoadConstants.JSON;
import static org.apache.doris.flink.sink.writer.LoadConstants.NULL_VALUE;
-import static org.apache.flink.table.data.RowData.createFieldGetter;
/**
* Serializer for RowData.
*/
public class RowDataSerializer implements DorisRecordSerializer<RowData> {
String[] fieldNames;
- RowData.FieldGetter[] fieldGetters;
String type;
private ObjectMapper objectMapper;
private final String fieldDelimiter;
private final boolean enableDelete;
+ private final DorisRowConverter rowConverter;
- private RowDataSerializer(String[] fieldNames, DataType[] dataTypes,
String type, String fieldDelimiter, boolean enableDelete) {
+ private RowDataSerializer(String[] fieldNames, RowType rowType, String
type, String fieldDelimiter, boolean enableDelete) {
Review Comment:
I think it might not be a good idea to modify the constructor because of the
risk of incompatibility with the current version.
In the DorisRowConverter class, would it be better to overload the
constructor for the parameters of type DataType?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]