[
https://issues.apache.org/jira/browse/FLINK-23939?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17409388#comment-17409388
]
Timo Walther edited comment on FLINK-23939 at 9/3/21, 9:04 AM:
---------------------------------------------------------------
[~yanchenyun] the names of the flags are not well chosen due to historical
reasons. {{fail=true => exception}} and {{ignore=true => no exception}} so you
have to use a combination of {{fail=false, ignore=true}} to not get an
exception. If I rememeber correctly, {{ignore-parse-errors=true}} is stronger
than {{fail-on-missing-field}} due to implementation details.
Please reopen if you think this is still a bug.
was (Author: twalthr):
[~yanchenyun] the names of the flags are not well chosen due to historical
reasons. {{fail=true => exception}} {{ignore=true => no exception}} so you have
to use a combination of {{fail=false, ignore=true}} to not get an exception. If
I rememeber correctly, {{ignore-parse-errors=true}} is stronger than
{{fail-on-missing-field}} due to implementation details.
Please reopen if you think this is still a bug.
> The result of validation and parsing failure does not match the document
> description
> ------------------------------------------------------------------------------------
>
> Key: FLINK-23939
> URL: https://issues.apache.org/jira/browse/FLINK-23939
> Project: Flink
> Issue Type: Bug
> Components: Formats (JSON, Avro, Parquet, ORC, SequenceFile)
> Affects Versions: 1.12.1
> Reporter: Carl
> Priority: Major
> Attachments: image-2021-08-24-16-12-48-465.png,
> image-2021-08-24-16-15-47-714.png, image-2021-08-24-16-21-05-386.png,
> image-2021-08-24-16-21-23-228.png, image-2021-08-24-16-24-13-246.png,
> image-2021-08-24-16-26-32-560.png, image-2021-08-24-16-34-48-347.png,
> image-2021-08-24-16-37-00-740.png
>
>
> *table options as follows,*
> !image-2021-08-24-16-12-48-465.png!
> *kafka source table ddl as follows:*
> !image-2021-08-24-16-15-47-714.png!
>
> *kafka message for test:*
> *message A:*
> !image-2021-08-24-16-21-05-386.png!
>
> *message B:*
> !image-2021-08-24-16-21-23-228.png!
> *1. Test 1:*
> json.fail-on-missing-field = *false*
> json.ignore-parse-errors = *false*
> produce test kafka message and result as follows,
> !image-2021-08-24-16-24-13-246.png!
> *As described in the documentation, the program should throw an exception?*
>
> *2. Test 2:*
> json.fail-on-missing-field = *false*
> json.ignore-parse-errors = *true*
>
> !image-2021-08-24-16-26-32-560.png!
> *As described in the documentation, the program should throw an exception?*
>
> *3. Test 3:*
> json.fail-on-missing-field = *true*
> json.ignore-parse-errors = *false*
>
> !image-2021-08-24-16-34-48-347.png!
>
> *4. Test 4 :*
>
> json.fail-on-missing-field = *true*
> json.ignore-parse-errors = *true*
>
> !image-2021-08-24-16-37-00-740.png!
>
> *As described in the documentation, why should'n both be true?*
>
> As above, the results of the above experiments make me confused. Can I
> achieve such an effect? When the parsing fails, skip this data, and do not
> throw an exception, and the program continues to run?
>
>
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)