Re: calcite variable $cor0 is not found

2021-02-08 Thread JiaTao Tao
Hi You'd better do the subquery elimination. org.apache.calcite.tools.Programs#subQuery org.apache.calcite.tools.Programs.DecorrelateProgram Regards! Aron Tao you Zhuang 于2021年2月9日周二 上午8:31写道: > String sql = "select id, name, (select id from test.users where id = b.id) > as pid from test.dep

calcite variable $cor0 is not found

2021-02-08 Thread you Zhuang
String sql = "select id, name, (select id from test.users where id = b.id) as pid from test.depts b"; sqlToRelConverter.convertQuery(validatedSqlNode, false, true) i can get the following [main:DEBUG] org.apache.calcite.sql2rel: Plan after converting SqlNode to RelNode LogicalProject(ID=[$0], NA

[jira] [Created] (CALCITE-4491) Aggregation of window function produces invalid SQL for PostgreSQL

2021-02-08 Thread Dominik Labuda (Jira)
Dominik Labuda created CALCITE-4491: --- Summary: Aggregation of window function produces invalid SQL for PostgreSQL Key: CALCITE-4491 URL: https://issues.apache.org/jira/browse/CALCITE-4491 Project: C