Github user paul-rogers commented on a diff in the pull request:

    https://github.com/apache/drill/pull/1001#discussion_r145574785
  
    --- Diff: 
exec/java-exec/src/main/codegen/templates/CastFunctionsSrcVarLenTargetVarLen.java
 ---
    @@ -73,6 +73,9 @@ public void eval() {
         out.start =  in.start;
         if (charCount <= length.value || length.value == 0 ) {
           out.end = in.end;
    +      if (charCount == (out.end-out.start)) {
    +        out.asciiMode = 1; // we can conclude this string is ASCII
    --- End diff --
    
    The values -1, 0, and 1 are magic numbers here. Because we want speed, we 
don't want to use an enum. But, can we define symbols for our values: 
`IS_ASCII`, `NOT_ASCII`, `ASCII_UNKNOWN`? (You decide on the names...)


---

Reply via email to