snuyanzin commented on code in PR #29010:
URL: https://github.com/apache/flink/pull/29010#discussion_r3872497772
##########
flink-table/flink-table-runtime/src/main/java/org/apache/flink/formats/raw/RawFormatDeserializationSchema.java:
##########
@@ -278,6 +283,39 @@ public Object convert(byte[] data) {
};
}
+ /**
+ * Creates a converter that decodes the bytes with the configured charset
and parses the text as
+ * a JSON document into a {@link Variant}. Duplicate object keys are
rejected, matching the
+ * default of {@code PARSE_JSON}.
+ */
+ private static DeserializationRuntimeConverter createVariantConverter(
+ final String charsetName) {
+ // this also checks the charsetName is valid
+ Charset.forName(charsetName);
Review Comment:
1. what happen if it is not valid?
2. why do we need to evaluate it one more time in runtime?
--
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]