Marcono1234 opened a new issue, #2799:
URL: https://github.com/apache/drill/issues/2799

   **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:
   - 
https://github.com/apache/drill/blob/5f8cdda2ac001d4267c3c903f3e92b9bf24e8713/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/CharSubstring.java#L92
   - 
https://github.com/apache/drill/blob/5f8cdda2ac001d4267c3c903f3e92b9bf24e8713/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/CharSubstring.java#L116
   - 
https://github.com/apache/drill/blob/5f8cdda2ac001d4267c3c903f3e92b9bf24e8713/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/CharSubstring.java#L127
   - 
https://github.com/apache/drill/blob/5f8cdda2ac001d4267c3c903f3e92b9bf24e8713/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/StringFunctions.java#L1111
   - 
https://github.com/apache/drill/blob/5f8cdda2ac001d4267c3c903f3e92b9bf24e8713/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/StringFunctions.java#L1260
   
   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.


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

To unsubscribe, e-mail: dev-unsubscr...@drill.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to