You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by "Roman Churganov (Jira)" <ji...@apache.org> on 2022/04/19 18:38:00 UTC
[jira] [Created] (CALCITE-5101) Query with LISTAGG, DISTINCT and ORDER BY
Roman Churganov created CALCITE-5101:
----------------------------------------
Summary: Query with LISTAGG, DISTINCT and ORDER BY
Key: CALCITE-5101
URL: https://issues.apache.org/jira/browse/CALCITE-5101
Project: Calcite
Issue Type: Bug
Components: core
Affects Versions: 1.29.0
Reporter: Roman Churganov
Execute query like:
{code:sql}
select C11, LISTAGG( distinct C12, ', ' )
from FOO
group by C11
{code}
{{In case of JDBC driver doesn't support LISTAGG function (Postresql), JDBC adapter creates subquery: }}
{code:sql}
SELECT "C11", "C12", ', ' AS "$f2"
FROM "FOO"
GROUP BY "C11", "C12", ', '
{code}
which cannot be executed on Postresql and gives error :
{noformat}
[42601] ERROR: non-integer constant in GROUP BY
{noformat}
--
This message was sent by Atlassian Jira
(v8.20.7#820007)