flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sunjincheng121 <...@git.apache.org>
Subject [GitHub] flink pull request #5218: [FLINK-8331][core] FieldParser do not correctly se...
Date Thu, 04 Jan 2018 15:42:33 GMT
Github user sunjincheng121 commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5218#discussion_r159682488
  
    --- Diff: flink-core/src/main/java/org/apache/flink/types/parser/StringParser.java ---
    @@ -42,6 +42,12 @@ public void enableQuotedStringParsing(byte quoteCharacter) {
     	@Override
     	public int parseField(byte[] bytes, int startPos, int limit, byte[] delimiter, String
reusable) {
     
    +		if (startPos == limit) {
    +			setErrorState(ParseErrorState.EMPTY_COLUMN);
    +			this.result = new String(bytes, startPos, limit - startPos, getCharset());
    --- End diff --
    
    I find new String will do some check.. but change to `this.result=""` also make sense.


---

Mime
View raw message