The issue is caused by the missing implementation of aggregate func max
over char types.  Currently, Drill only has max implemented for bit, number
types, but not for char type.

Since char type could be implicitly cast to number,  the max() in the query
is resolved to max(number_type), and throw NumberFormatException in
execution phase, since the input is not a valid number value.


On Fri, Apr 11, 2014 at 3:31 PM, Krystal (JIRA) <[email protected]> wrote:

> Krystal created DRILL-504:
> -----------------------------
>
>              Summary: Max function against string fails
>                  Key: DRILL-504
>                  URL: https://issues.apache.org/jira/browse/DRILL-504
>              Project: Apache Drill
>           Issue Type: Bug
>     Affects Versions: 1.0.0
>             Reporter: Krystal
>
>
> Ran the following query:
> select max(name) from dfs.`student`;
>
> The query failed with the following error:
> Query failed: org.apache.drill.exec.rpc.RpcException: Remote failure while
> running query.[error_id: "c7f5cb9e-e172-4366-9a86-99523cc828b5"
> endpoint {
>   address: "qa-node57.qa.lab"
>   user_port: 31010
>   control_port: 31011
>   data_port: 31012
> }
> error_type: 0
> message: "Failure while running fragment. < NumberFormatException:[ fred
> ovid ]"
> ]
> Error: exception while executing query (state=,code=0)
> 0: jdbc:drill:schema=dfs> select max(name) from dfs.`student`;
> Query failed: org.apache.drill.exec.rpc.RpcException: Remote failure while
> running query.[error_id: "b7d8d803-68ad-49ef-9958-1d4c6708bd1b"
> endpoint {
>   address: "qa-node57.qa.lab"
>   user_port: 31010
>   control_port: 31011
>   data_port: 31012
> }
> error_type: 0
> message: "Failure while running fragment. < NumberFormatException:[ fred
> ovid ]"
> ]
> Error: exception while executing query (state=,code=0)
>
>
>
>
> --
> This message was sent by Atlassian JIRA
> (v6.2#6252)
>

Reply via email to