liyafan82 commented on a change in pull request #8183: 
[FLINK-12210][Runtime]Fix the bug of redundant removing of '\r'
URL: https://github.com/apache/flink/pull/8183#discussion_r276051242
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/memory/AbstractPagedInputView.java
 ##########
 @@ -398,9 +398,7 @@ public String readLine() throws IOException {
                try {
                        int b;
                        while ((b = readUnsignedByte()) != '\n') {
-                               if (b != '\r') {
-                                       bld.append((char) b);
-                               }
+                               bld.append((char) b);
 
 Review comment:
   > I don't think this can be changed, here we remove all the '\r' and line 
412 just remove the last '\r'.
   
   Thank you so much for your comment. 
   1. If we have removed all the '\r', why do we have to remove the last '\r'?
   2. If the '\r' appears in the middle of a line, it is not used as a line 
separator, and we should not remove it, although this rarely happens in 
practice.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to