[ 
https://issues.apache.org/jira/browse/CALCITE-4210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17196595#comment-17196595
 ] 

Julian Hyde commented on CALCITE-4210:
--------------------------------------

* I don't think it makes sense to split 'createJoinCondition' into 3 methods 
'createJoinNatural', 'createJoinUsing' etc. It obscures the fact that USING and 
NATURAL are just short-hands for ON, and that, once you have derived a 
condition, all of the syntaxes are essentially the same. By splitting the 
methods you have created an opportunity for code to drift over time.
* Could inner class be static?
* Could {{blackboardRegisterArgsList}} be final?
* I have no comment on whether you have fixed the algorithm; it confuses me.

> Sub Query is 'On' clause does not correctly expand in SqlToRelConverter
> -----------------------------------------------------------------------
>
>                 Key: CALCITE-4210
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4210
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>            Reporter: James Starr
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Aggregation is dropped during decorreleation.
> {code:java}
> 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"
> )
> {code}
> {code:java}
> LogicalProject(department_id=[$9], salary=[$13])
>   LogicalJoin(condition=[=($13, $0)], joinType=[left])
>     LogicalTableScan(table=[[foodmart, department]])
>     LogicalTableScan(table=[[foodmart, employee]]){code}
> This may be related to CALCITE-4206.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to