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

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

Github user fpompermaier commented on the pull request:

    https://github.com/apache/flink/pull/2007#issuecomment-221862570
  
    Hi Stephan, thanks for reviewing this PR.
    These are my reasons to not apply your suggestions to my PR, and I'd like 
to hear your opinion (anyone interested by this discussion is also welcome) 
before reissuing the PR with such modifications:
    
    - rename `reset` to `resetErrorStateAndParse`: for almost all parsers this 
doesn't do anything more than those 2 operations but what if for a further 
parserImpl you need to do anything else before parsing? 
    - resetting the error state is something that must always be done, by all 
parser implementations. The `parseFieldImpl` is a way to force this thing, 
otherwise you should rely on classes using such parser to remember this thing 
(as you suggested with "GenericCsvInputCormat would call the 
resetErrorStateAndParse") or ensure that every parser call it at the very 
beginning of the `parseField()`.
    I'm really concerned about this. In this way, my PR doesn't break the 
current APIs
    
    Does it makes sense?



> FieldParsers error state is not reset correctly to NONE
> -------------------------------------------------------
>
>                 Key: FLINK-3908
>                 URL: https://issues.apache.org/jira/browse/FLINK-3908
>             Project: Flink
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.2
>            Reporter: Flavio Pompermaier
>            Assignee: Flavio Pompermaier
>              Labels: parser
>
> If during the parse of a csv there's a parse error (for example when in a 
> integer column there are non-int values) the errorState is not reset 
> correctly in the next parseField call. A simple fix would be to add as a 
> first statement of the {{parseField()}} function a call to 
> {{setErrorState(ParseErrorState.NONE)}} but it is something that should be 
> handled better (by default) for every subclass of {{FieldParser<T>}}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to