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

    https://github.com/apache/flink/pull/5218#discussion_r159670504
  
    --- Diff: 
flink-core/src/main/java/org/apache/flink/types/parser/StringValueParser.java 
---
    @@ -45,6 +45,12 @@ public void enableQuotedStringParsing(byte 
quoteCharacter) {
        @Override
        public int parseField(byte[] bytes, int startPos, int limit, byte[] 
delimiter, StringValue reusable) {
     
    +           if (startPos == limit) {
    +                   setErrorState(ParseErrorState.EMPTY_COLUMN);
    +                   reusable.setValueAscii(bytes, startPos, limit - 
startPos);
    --- End diff --
    
    change to `reusable.setValueAscii(bytes, startPos, 0);`
    
    also this early out means that the later check `if (limit == startPos)` in 
line 99 will never be true and can be removed.


---

Reply via email to