[
https://issues.apache.org/jira/browse/IGNITE-4750?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16330184#comment-16330184
]
liu xionghao edited comment on IGNITE-4750 at 1/18/18 7:30 AM:
---------------------------------------------------------------
It occurs errors when using +count(*distinct* ...)+ and +group_concat(...)+ in
same select clause. But if key word +*distinct*+ omited, it works.
example:
{code:java}
// code placeholder
select count(distinct a) as num, group_concat(a) as strs
from test
group by b{code}
table *test* data:
||id (int)||a (varchar)||b (varchar)||
|1|1|2|
|2|3|2|
|3|1|3|
{color:#FF0000}error: {color}
{code:java}
[18-Jan-2018 15:23:11][ERROR][client-connector-#54][JdbcRequestHandler] Failed
to execute SQL query [reqId=0, req=JdbcQueryExecuteRequest [schemaName=PUBLIC,
pageSize=1024, maxRows=0, sqlQry=select count(distinct a) as num,
group_concat(a) as strs
from test
group by b, args=[], stmtType=ANY_STATEMENT_TYPE]]
javax.cache.CacheException: Failed to run map query remotely.
at
org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor.query(GridReduceQueryExecutor.java:747)
at
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing$8.iterator(IgniteH2Indexing.java:1282)
at
org.apache.ignite.internal.processors.cache.QueryCursorImpl.iterator(QueryCursorImpl.java:95)
{code}
was (Author: xionghao):
It occurs errors when using +count(*distinct* ...)+ and +group_concat(...)+ in
same select clause. But if key word +*distinct*+ omited, it works.
example:
{code:java}
// code placeholder
select count(distinct a) as num, group_concat(a) as strs
from test
group by b{code}
where `test` schema:
||id (int)||a (varchar)||b (varchar)||
|1|1|2|
|2|3|2|
|3|1|3|
error:
{code:java}
[18-Jan-2018 15:23:11][ERROR][client-connector-#54][JdbcRequestHandler] Failed
to execute SQL query [reqId=0, req=JdbcQueryExecuteRequest [schemaName=PUBLIC,
pageSize=1024, maxRows=0, sqlQry=select count(distinct a) as num,
group_concat(a) as strs
from test
group by b, args=[], stmtType=ANY_STATEMENT_TYPE]]
javax.cache.CacheException: Failed to run map query remotely.
at
org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor.query(GridReduceQueryExecutor.java:747)
at
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing$8.iterator(IgniteH2Indexing.java:1282)
at
org.apache.ignite.internal.processors.cache.QueryCursorImpl.iterator(QueryCursorImpl.java:95)
{code}
> SQL: Support GROUP_CONCAT function
> ----------------------------------
>
> Key: IGNITE-4750
> URL: https://issues.apache.org/jira/browse/IGNITE-4750
> Project: Ignite
> Issue Type: Task
> Components: sql
> Reporter: Denis Magda
> Assignee: Taras Ledkov
> Priority: Major
> Fix For: 2.5
>
>
> GROUP_CONCAT function is not supported at the moment. Makes sense to fill
> this gap:
> http://apache-ignite-users.70518.x6.nabble.com/GROUP-CONCAT-function-is-unsupported-td10757.html
> Presently the function doc is hidden:
> https://apacheignite-sql.readme.io/docs/group_concat
> Open it up once the ticket is released.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)