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
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
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