You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Hanifi Gunes (JIRA)" <ji...@apache.org> on 2015/01/13 01:09:35 UTC

[jira] [Commented] (DRILL-1870) SQL functions cannot be applied along side convert_from

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

Hanifi Gunes commented on DRILL-1870:
-------------------------------------

cannot reprod this. can you confirm that the problem exists at 487d98e?

> SQL functions cannot be applied along side convert_from
> -------------------------------------------------------
>
>                 Key: DRILL-1870
>                 URL: https://issues.apache.org/jira/browse/DRILL-1870
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Functions - Drill
>            Reporter: Abhishek Girish
>            Assignee: Hanifi Gunes
>             Fix For: 0.8.0
>
>
> 1. Concat:
> > select concat(onecf['name'], ' hello ') name from voter where row_key=1;
> +------------+
> |    name    |
> +------------+
> | nick miller hello  |
> +------------+
> > select concat(convert_from(onecf['name'], 'utf8'), '') name from voter where row_key=1;
> Query failed: Query failed: Failure while trying to start remote fragment, Encountered an illegal char on line 1, column 28: '' [ e40f445c-d3bc-4d8f-9ed2-d425ef332c3d on abhi6.qa.lab:31010 ]
> Error: exception while executing query: Failure while executing query. (state=,code=0)
> 2. Char Length:
> > select char_length(convert_from(onecf['name'], 'UTF8')) name from voter where row_key=1;
> Query failed: Query failed: Failure while trying to start remote fragment, Encountered an illegal char on line 1, column 33: '' [ 9aecabb7-189e-4f1d-9c34-9dda76593740 on abhi8.qa.lab:31010 ]
> Error: exception while executing query: Failure while executing query. (state=,code=0)
> > select char_length(onecf['name']) name from voter where row_key=1;
> +------------+
> |    name    |
> +------------+
> | 11         |
> +------------+
> 1 row selected (0.186 seconds)
> 3. SubString:
> > select substr(onecf['name'], 5, 8) name from voter where row_key=1;
> +------------+
> |    name    |
> +------------+
> |  miller    |
> +------------+
> 1 row selected (0.181 seconds)
> > select substr(convert_from(onecf['name'], 'utf8'), 5, 8) name from voter where row_key=1;
> Query failed: Query failed: Failure while trying to start remote fragment, Encountered an illegal char on line 1, column 28: '' [ 402c55e2-99e4-4b7b-b6c0-d9e5f5f66321 on abhi6.qa.lab:31010 ]
> Error: exception while executing query: Failure while executing query. (state=,code=0)
> 4. InitCap:
> > select initcap(onecf['name']) name from voter where row_key=1;
> +------------+
> |    name    |
> +------------+
> | Nick Miller |
> +------------+
> 1 row selected (0.151 seconds)
> > select initcap(convert_from(onecf['name'], 'utf8')) name from voter where row_key=1;
> Query failed: Query failed: Failure while trying to start remote fragment, Encountered an illegal char on line 1, column 29: '' [ b7eef4e3-72c0-48ab-b91a-54db6e6623d7 on abhi8.qa.lab:31010 ]
> Error: exception while executing query: Failure while executing query. (state=,code=0)
> Similarly other functions do not work. 
> Log message:
> 2014-12-15 13:10:50,891 [BitServer-3] ERROR o.a.d.exec.rpc.control.ControlServer - Error 5668a697-8c64-4e8b-895d-e4faa642749d: Failure while trying to start remote fragment
> org.apache.drill.exec.rpc.UserRpcException: com.fasterxml.jackson.databind.JsonMappingException: Encountered an illegal char on line 1, column 29: '' (through reference chain: java.util.ArrayList[0])
>         at org.apache.drill.exec.work.batch.ControlHandlerImpl.startNewRemoteFragment(ControlHandlerImpl.java:139) ~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
> ...
> ...
> Caused by: com.fasterxml.jackson.databind.JsonMappingException: Encountered an illegal char on line 1, column 29: '' (through reference chain: java.util.ArrayList[0])
>         at com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:210) ~[jackson-databind-2.4.3.jar:2.4.3]
>        ...
> ...
> Caused by: java.lang.RuntimeException: Encountered an illegal char on line 1, column 29: ''
>         at org.apache.drill.common.expression.parser.ExprLexer.mFallThrough(ExprLexer.java:3144) ~[drill-common-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
>         at org.apache.drill.common.expression.parser.ExprLexer.mTokens(ExprLexer.java:3693) ~[drill-common-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
>         at org.antlr.runtime.Lexer.nextToken(Lexer.java:89) ~[antlr-runtime-3.4.jar:na]
>  ...
> ...



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)