Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
Description
SqlToRelConverter does not correctly expand a sub-query in an ON clause. Aggregation is dropped during decorrelation.
SELECT "employee"."department_id", "employee"."salary" FROM "department" LEFT JOIN "employee" ON "employee"."salary" = ( SELECT max("employee"."salary") FROM "employee" WHERE "employee"."department_id" = "department"."department_id" )
LogicalProject(department_id=[$9], salary=[$13]) LogicalJoin(condition=[=($13, $0)], joinType=[left]) LogicalTableScan(table=[[foodmart, department]]) LogicalTableScan(table=[[foodmart, employee]])
This may be related to CALCITE-4206.
Attachments
Issue Links
- incorporates
-
CALCITE-1045 Decorrelate sub-queries in Project and Join
- Reopened
- is related to
-
CALCITE-1757 Convert sub-query to windowed aggregate function ("WinMagic")
- Open
- relates to
-
CALCITE-4100 Join plan with select MAX subquery drops MAX operator
- Open
- links to