[
https://issues.apache.org/jira/browse/FLINK-14364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16949243#comment-16949243
]
Jingsong Lee commented on FLINK-14364:
--------------------------------------
{code:java}
String string = "#Test,12,Test";
final TypeInformation<Row> rowInfo = Types.ROW(Types.STRING, Types.INT,
Types.STRING);
final CsvRowDeserializationSchema.Builder deserSchemaBuilder = new
CsvRowDeserializationSchema.Builder(rowInfo)
.setIgnoreParseErrors(false)
.setAllowComments(true);
System.out.println(deserialize(deserSchemaBuilder, string));
{code}
Here is example~
> Allow comments fail when not ignore parse errors in
> CsvRowDeserializationSchema
> -------------------------------------------------------------------------------
>
> Key: FLINK-14364
> URL: https://issues.apache.org/jira/browse/FLINK-14364
> Project: Flink
> Issue Type: Bug
> Components: Table SQL / API
> Reporter: Jingsong Lee
> Priority: Major
> Fix For: 1.10.0
>
>
> Use CsvRowDeserializationSchema, when setIgnoreParseErrors(false) and
> setAllowComments(true).
> If there are some comments in msg, will throw MismatchedInputException.
> If this a bug? and we should catch MismatchedInputException and return null?
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)