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

Gayathri commented on DRILL-7161:
---------------------------------

[~lhfei]

Thank you for your response. 

If the following query is given, it is working fine without using any CAST even 
for null values.

SELECT sum(b) FROM dfs.`C:\\Users\\user\\Desktop\\sample.json`;

> Aggregation with group by clause
> --------------------------------
>
>                 Key: DRILL-7161
>                 URL: https://issues.apache.org/jira/browse/DRILL-7161
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Functions - Drill
>    Affects Versions: 1.14.0
>            Reporter: Gayathri
>            Assignee: Hefei Li
>            Priority: Blocker
>              Labels: Drill, issue
>             Fix For: 1.14.0
>
>
> Facing some issues with the following case:
> Json file (*sample.json*) is having the following content:
> {"a":2,"b":null}
> {"a":2,"b":null}
> {"a":3,"b":null}
> {"a":4,"b":null}
> *Query:*
> SELECT a, sum(b) FROM dfs.`C:\\Users\\user\\Desktop\\sample.json` group by a;
> *Error:*
> UNSUPPORTED_OPERATION ERROR: Only COUNT, MIN and MAX aggregate functions 
> supported for VarChar type
> *Observation:*
> If we query without using group by, then it is working fine without any 
> error. If group by is used, then sum of null values is throwing the above 
> error.
>  
> Can anyone please let us know the solution for this or if there are any 
> alternative.



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

Reply via email to