You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/11/06 05:51:00 UTC

[jira] [Commented] (DRILL-6717) lower and upper functions not works with national charactes

    [ https://issues.apache.org/jira/browse/DRILL-6717?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16676196#comment-16676196 ] 

ASF GitHub Bot commented on DRILL-6717:
---------------------------------------

paul-rogers commented on a change in pull request #1450: DRILL-6717: lower and upper functions not works with national characters
URL: https://github.com/apache/drill/pull/1450#discussion_r231004879
 
 

 ##########
 File path: exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/StringFunctions.java
 ##########
 @@ -786,10 +784,11 @@ public void setup() {
 
     @Override
     public void eval() {
-      out.buffer = buffer = buffer.reallocIfNeeded(input.end - input.start);
+      byte[] result = org.apache.drill.exec.expr.fn.impl.StringFunctionHelpers.initCap(input.start, input.end, input.buffer);
 
 Review comment:
   The earlier functions handle the DrillBuf to string conversion and the String to byte[] conversion. Might want to do that here, changing the initCap() method to:
   
   ```
   String initCap(String input)
   ```

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


> lower and upper functions not works with national charactes
> -----------------------------------------------------------
>
>                 Key: DRILL-6717
>                 URL: https://issues.apache.org/jira/browse/DRILL-6717
>             Project: Apache Drill
>          Issue Type: Bug
>    Affects Versions: 1.14.0
>            Reporter: Oleg Zinoviev
>            Assignee: Oleg Zinoviev
>            Priority: Major
>             Fix For: 1.15.0
>
>         Attachments: result.csv, sample.json
>
>
> upper() and lower() functions works only with a ascii characters.
> sample dataset:  [^sample.json] 
> query:
> {code:sql}
> select 
>   upper(ascii_l) as upper_ascii, 
>   upper(national_l) as upper_national, 
>   lower(ascii_u) as lower_ascii, 
>   lower(national_u) as lower_national 
> from dfs.`sample.json`
> {code}
> drill response:  [^result.csv] 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)