KurtYoung commented on a change in pull request #8689: 
[FLINK-12802][table-runtime-blink] Reducing the Code of BinaryString
URL: https://github.com/apache/flink/pull/8689#discussion_r294125722
 
 

 ##########
 File path: 
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/BinaryString.java
 ##########
 @@ -97,32 +105,12 @@ public static BinaryString blankString(int length) {
                return fromBytes(spaces);
        }
 
-       /**
-        * Returns the number of bytes for a code point with the first byte as 
`b`.
-        * @param b The first byte of a code point
-        */
-       private static int numBytesForFirstByte(final byte b) {
-               if (b >= 0) {
-                       // 1 byte, 7 bits: 0xxxxxxx
-                       return 1;
-               } else if ((b >> 5) == -2 && (b & 0x1e) != 0) {
-                       // 2 bytes, 11 bits: 110xxxxx 10xxxxxx
-                       return 2;
-               } else if ((b >> 4) == -2) {
-                       // 3 bytes, 16 bits: 1110xxxx 10xxxxxx 10xxxxxx
-                       return 3;
-               } else if ((b >> 3) == -2) {
-                       // 4 bytes, 21 bits: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
-                       return 4;
-               } else {
-                       // throw new IllegalArgumentException();
-                       // Skip the first byte disallowed in UTF-8
-                       return 1;
-               }
-       }
+       // 
------------------------------------------------------------------------------------------
+       // Utility open methods on BinaryString
 
 Review comment:
   what's `Open Interfaces`? Do you try to mean `Public interfaces`?

----------------------------------------------------------------
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