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

Julian Hyde commented on CALCITE-7077:
--------------------------------------

You should lead with what you intend to do, not your rationale ("Invalid 
unparse for FULL JOIN").

To reference another Jira case, don't use a hyperlink, just write the case 
number, e.g.  CALCITE-7050. Jira will show the link in strike-through font when 
the case is closed.

Does your rewrite rule work for non-equi conditions, e.g. "e.empno < d.deptno"? 
Does your rewrite rule work for conditions that are not strong (see 
CALCITE-1753), e.g. "e.deptno = d.deptno or e.deptno is null and e.deptno = 
73"? 

> Implement a rule to rewrite FULL JOIN as LEFT JOIN and RIGHT JOIN
> -----------------------------------------------------------------
>
>                 Key: CALCITE-7077
>                 URL: https://issues.apache.org/jira/browse/CALCITE-7077
>             Project: Calcite
>          Issue Type: New Feature
>            Reporter: Zhen Chen
>            Assignee: Zhen Chen
>            Priority: Minor
>
> Invalid unparse for FULL JOIN in MySQLDialect is described in 
> [CALCITE-7050|https://issues.apache.org/jira/browse/CALCITE-7050]. For this, 
> a rule can be implemented to rewrite FULL JOIN into LEFT JOIN and RIGHT JOIN. 
> For example:
> original sql:
> {code:java}
> SELECT *
> FROM Employees e
> FULL JOIN Departments d ON e.id = d.id
> {code}
> rewrite into
> {code:java}
> SELECT *
> FROM Employees e
> LEFT JOIN Departments d ON e.id = d.id
> UNION ALL
> SELECT *
> FROM Employees e
> RIGHT JOIN Departments d ON e.id = d.id
> where e.id is null; 
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to