[
https://issues.apache.org/jira/browse/FLINK-14739?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17328213#comment-17328213
]
Flink Jira Bot commented on FLINK-14739:
----------------------------------------
This major issue is unassigned and itself and all of its Sub-Tasks have not
been updated for 30 days. So, it has been labeled "stale-major". If this ticket
is indeed "major", please either assign yourself or give an update. Afterwards,
please remove the label. In 7 days the issue will be deprioritized.
> add failOnCastException Configuration to Json FormatDescriptor
> --------------------------------------------------------------
>
> Key: FLINK-14739
> URL: https://issues.apache.org/jira/browse/FLINK-14739
> Project: Flink
> Issue Type: Bug
> Components: Formats (JSON, Avro, Parquet, ORC, SequenceFile)
> Affects Versions: 1.9.1
> Reporter: Jun Zhang
> Priority: Major
> Labels: stale-major
> Fix For: 1.9.4
>
>
> When flink read data from kafka (format is json), the schema is defined,
> similar to the following DDL
> {code:java}
> CREATE TABLE kafka_source (
> intotime VARCHAR,
> userinfo ROW<name VARCHAR,age int>
> ) WITH (
> 'connector.type' = 'kafka',
> 'format.type' = 'json',
> .............
> )
> {code}
> But when flink encounters error data, such as the type of userinfo is a
> string, the program will throw the following exception and then fail.
> {code:java}
> Caused by: java.lang.ClassCastException:
> org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.node.TextNode
> cannot be cast to org.apache.flink.shaded.jackson2.com.fasterxml.jackson.
> databind.node.ObjectNode
> {code}
> I want to find the wrong data and don't want the program to fail. So I want
> to add a json configuration, just like
> org.apache.flink.table.descriptors.Json#failOnMissingField, which allows the
> user to configure.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)