libenchao commented on a change in pull request #11119: [FLINK-15396][json] Support to ignore parse errors for JSON format URL: https://github.com/apache/flink/pull/11119#discussion_r382900561
########## File path: flink-formats/flink-json/src/main/java/org/apache/flink/formats/json/JsonRowDeserializationSchema.java ########## @@ -88,14 +88,25 @@ private DeserializationRuntimeConverter runtimeConverter; + /** Flag indicating whether to ignore invalid fields/rows (default: throw an exception). */ + private final boolean ignoreParseErrors; + private JsonRowDeserializationSchema( TypeInformation<Row> typeInfo, - boolean failOnMissingField) { + boolean failOnMissingField, + boolean ignoreParseErrors) { checkNotNull(typeInfo, "Type information"); checkArgument(typeInfo instanceof RowTypeInfo, "Only RowTypeInfo is supported"); this.typeInfo = (RowTypeInfo) typeInfo; this.failOnMissingField = failOnMissingField; this.runtimeConverter = createConverter(this.typeInfo); + this.ignoreParseErrors = ignoreParseErrors; + } + + private JsonRowDeserializationSchema( Review comment: seems that we don't need this constructor any more ? ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services