hannerwang commented on PR #2693:
URL: https://github.com/apache/calcite/pull/2693#issuecomment-1095138595
Hi @FDoKE , Good point! I made a test `select string_agg(ename, ',' ORDER BY
ename) as agg, job as ename from emp GROUP BY job`, its plan is
`LogicalProject(AGG=[$1], ENAME=[$0])
LogicalAggregate(group=[{0}], AGG=[LISTAGG($1, $2) WITHIN GROUP ([1])])
LogicalProject(ENAME=[$2], $f1=[$1], $f2=[','])
JdbcTableScan(table=[[JDBC_SCOTT, EMP]])`
JDBC adapter generates sql `SELECT LISTAGG(ENAME, ',') WITHIN GROUP (ORDER
BY ENAME IS NULL, ENAME) AS AGG, JOB AS ENAME\nFROM SCOTT.EMP\nGROUP BY JOB`
So I think the pr could have handled this case, do you think so?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]