You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The code contains multiple x < ... checks where x is a byte and the right-hand side is > 127 (= max byte value), so these conditions are always true:
if (currentByte < 0x128 || // 1-byte char. First byte is 0xxxxxxx.
Not completely sure what the fix here is, maybe (byte & 0xFF) < .... And also for StringFunctions maybe it should be 128 (decimal) instead of 0x128 (hex, = 296 decimal); at least the 0x128 looks a bit suspicious.
The text was updated successfully, but these errors were encountered:
Describe the bug
The code contains multiple
x < ...
checks wherex
is abyte
and the right-hand side is > 127 (= maxbyte
value), so these conditions are always true:drill/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/CharSubstring.java
Line 92 in 5f8cdda
drill/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/CharSubstring.java
Line 116 in 5f8cdda
drill/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/CharSubstring.java
Line 127 in 5f8cdda
drill/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/StringFunctions.java
Line 1111 in 5f8cdda
drill/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/StringFunctions.java
Line 1260 in 5f8cdda
Not completely sure what the fix here is, maybe
(byte & 0xFF) < ...
. And also forStringFunctions
maybe it should be128
(decimal) instead of0x128
(hex, = 296 decimal); at least the0x128
looks a bit suspicious.The text was updated successfully, but these errors were encountered: