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

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

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

    https://github.com/apache/flink/pull/4088#discussion_r122929197
  
    --- Diff: 
flink-core/src/main/java/org/apache/flink/api/common/io/DelimitedInputFormat.java
 ---
    @@ -246,6 +246,9 @@ public void setDelimiter(String delimiter) {
                        throw new IllegalArgumentException("Delimiter must not 
be null");
                }
                this.delimiter = delimiter.getBytes(getCharset());
    +           if (this.bufferSize > 0 && this.delimiter.length >= 
this.bufferSize) {
    --- End diff --
    
    since the initial value for `bufferSize` is `-1` doesn't this mean that the 
delimiter can never be set without calling `setBufferSize`? Would it make sense 
to move this check into `open()`?


> Problem with DelimitedInputFormat
> ---------------------------------
>
>                 Key: FLINK-6652
>                 URL: https://issues.apache.org/jira/browse/FLINK-6652
>             Project: Flink
>          Issue Type: Bug
>          Components: Batch Connectors and Input/Output Formats
>    Affects Versions: 1.2.1
>            Reporter: Moritz Schubotz
>            Assignee: Fabian Hueske
>             Fix For: 1.2.0
>
>
> After upgrading from Flink 1.2.0 to 1.2.1 I got the following error
> ```
> 07:54:52,395 ERROR org.apache.flink.api.common.io.DelimitedInputFormat        
>    - Unexpected problen while getting the file statistics for file 
> 'mytestfile': -1
> java.lang.ArrayIndexOutOfBoundsException: -1
>       at 
> org.apache.flink.api.common.io.DelimitedInputFormat.readLine(DelimitedInputFormat.java:572)
>       at 
> org.apache.flink.api.common.io.DelimitedInputFormat.getStatistics(DelimitedInputFormat.java:423)
>       at 
> org.apache.flink.api.common.io.DelimitedInputFormat.getStatistics(DelimitedInputFormat.java:48)
>       at 
> org.apache.flink.optimizer.dag.DataSourceNode.computeOperatorSpecificDefaultEstimates(DataSourceNode.java:166)
> ```
> I have created a test repo to isolate the issue here
> https://github.com/physikerwelt/flinkReadTest
> and reproduced the bug using travis
> https://travis-ci.org/physikerwelt/flinkReadTest



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

Reply via email to