raminqaf commented on code in PR #29010:
URL: https://github.com/apache/flink/pull/29010#discussion_r3879889921
##########
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. According to the `forName` java docs
```
Throws:
IllegalCharsetNameException – If the given charset name is illegal
IllegalArgumentException – If the given charsetName is null
UnsupportedCharsetException – If no support for the named charset is
available in this
```
2. It is not necessary here. I have removed it and we can rely only on the
`forName` when we call `open()`
--
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]