flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-8331) FieldParsers do not correctly set EMPT_COLUMN error state
Date Sun, 31 Dec 2017 06:54:00 GMT

    [ https://issues.apache.org/jira/browse/FLINK-8331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16307125#comment-16307125
] 

ASF GitHub Bot commented on FLINK-8331:
---------------------------------------

Github user sunjincheng121 commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5218#discussion_r159134590
  
    --- Diff: flink-java/src/test/java/org/apache/flink/api/java/io/RowCsvInputFormatTest.java
---
    @@ -61,6 +62,84 @@
     	private static final String FIRST_PART = "That is the first part";
     	private static final String SECOND_PART = "That is the second part";
     
    +	@Test
    +	public void testNullValueWithoutTrailingDelimiter() throws Exception {
    --- End diff --
    
    About `RowCsvInputFormatTest.testEmptyFields()`do not check the tailing empty field, And
in  `RowCsvInputFormatTest.testTailingEmptyFields`, test tailing empty field for STRING type.
I think we shoud add 
    DOUBLE/FLOAT/BIGINT/BIGDEC/SQL_DATE/SQL_TIME/SQL_TIMESTAMP test case as well.
    What do you think?


> FieldParsers do not correctly set EMPT_COLUMN error state
> ---------------------------------------------------------
>
>                 Key: FLINK-8331
>                 URL: https://issues.apache.org/jira/browse/FLINK-8331
>             Project: Flink
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.5.0, 1.4.1
>            Reporter: Fabian Hueske
>            Assignee: sunjincheng
>
> Some {{FieldParser}} do not correctly set the EMPTY_COLUMN error state if a field is
empty.
> Instead, they try to parse the field value from an empty String which fails, e.g., in
case of the {{DoubleParser}} with a {{NumberFormatException}}.
> The {{RowCsvInputFormat}} has a flag to interpret empty fields as {{null}} values. The
implementation requires that all {{FieldParser}} correctly return the EMPTY_COLUMN error state
in case of an empty field.
> Affected {{FieldParser}}:
> - BigDecParser
> - BigIntParser
> - DoubleParser
> - FloatParser
> - SqlDateParser
> - SqlTimeParser
> - SqlTimestampParser



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message