[
https://issues.apache.org/jira/browse/DRILL-1998?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14370330#comment-14370330
]
Khurram Faraaz commented on DRILL-1998:
---------------------------------------
Incorrect error message. I do a sum over integer type data and the message in
the Exception says, Only COUNT aggregate function supported for Boolean type
0: jdbc:drill:> select columns[4], sum(columns[1])
. . . . . . . > from `conftest.csv`
. . . . . . . > group by columns[4];
+------------+------------+
| EXPR$0 | EXPR$1 |
+------------+------------+
Query failed: RemoteRpcException: Failure while running fragment., Only COUNT
aggregate function supported for Boolean type [
4cbadd92-9982-4829-8ff0-4967aa7417fb on centos-01.qa.lab:31010 ]
[ 4cbadd92-9982-4829-8ff0-4967aa7417fb on centos-01.qa.lab:31010 ]
java.lang.RuntimeException: java.sql.SQLException: Failure while executing
query.
at sqlline.SqlLine$IncrementalRows.hasNext(SqlLine.java:2514)
at sqlline.SqlLine$TableOutputFormat.print(SqlLine.java:2148)
at sqlline.SqlLine.print(SqlLine.java:1809)
at sqlline.SqlLine$Commands.execute(SqlLine.java:3766)
at sqlline.SqlLine$Commands.sql(SqlLine.java:3663)
at sqlline.SqlLine.dispatch(SqlLine.java:889)
at sqlline.SqlLine.begin(SqlLine.java:763)
at sqlline.SqlLine.start(SqlLine.java:498)
at sqlline.SqlLine.main(SqlLine.java:460)
> Confusing error message when you pass character data type to SUM aggregate
> function
> -----------------------------------------------------------------------------------
>
> Key: DRILL-1998
> URL: https://issues.apache.org/jira/browse/DRILL-1998
> Project: Apache Drill
> Issue Type: Bug
> Components: Execution - Data Types
> Affects Versions: 0.8.0
> Reporter: Victoria Markman
> Assignee: Daniel Barclay (Drill)
> Priority: Minor
> Fix For: 0.9.0
>
>
> t.json
> {code}
> { "a2": 1, "b2": 1, "c2": 1, "d2": "aaa", e1: "2015-01-01"}
> { "a2": 2, "b2": 2, "c2": 2, "d2": "bbb", e1: "2015-01-02"}
> { "a2": 2, "b2": 2, "c2": 2, "d2": "bbb", e1: "2015-01-02"}
> { "a2": 5, "b2": 5, "c2": 5, "d2": "eee", e1: "2015-01-05"}
> {code}
> {code}
> 0: jdbc:drill:schema=dfs> select sum(d2) from `t2.json`;
> Query failed: Query failed: Failure while running fragment., Only COUNT
> aggregate function supported for Boolean type [
> 003f011e-ae98-47ac-99c8-1674b1edb74b on atsqa4-133.qa.lab:31010 ]
> [ 003f011e-ae98-47ac-99c8-1674b1edb74b on atsqa4-133.qa.lab:31010 ]
> Error: exception while executing query: Failure while executing query.
> (state=,code=0)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)