[
https://issues.apache.org/jira/browse/TAJO-1453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14383442#comment-14383442
]
Yongjin Choi commented on TAJO-1453:
------------------------------------
Hi, all
Most databases seem to support parenthesized table reference list.
(plz refer to http://dev.mysql.com/doc/refman/5.0/en/join.html)
{code:sql}
SELECT * FROM t1 LEFT JOIN (t2, t3, t4)
ON (t2.a=t1.a AND t3.b=t1.b AND t4.c=t1.c)
{code}
is equivalent to:
{code:sql}
SELECT * FROM t1 LEFT JOIN (t2 CROSS JOIN t3 CROSS JOIN t4)
ON (t2.a=t1.a AND t3.b=t1.b AND t4.c=t1.c)
{code}
I append a simple patch so that [~i1befree] can continue his tests and find
more complex cases.
The patch is quite immature, but it can help avoiding parse error and the
result won’t be wrong as long as join types used in sql are commutative.
Like [~hyunsik] said, we could decide how to fix this issue after some more
tests and discussion.
> sql parse error occured with join query
> ---------------------------------------
>
> Key: TAJO-1453
> URL: https://issues.apache.org/jira/browse/TAJO-1453
> Project: Tajo
> Issue Type: Bug
> Components: parser
> Affects Versions: 0.10.0
> Reporter: Jungryong Lee
> Priority: Minor
>
> It is simple parse error.
> I am testing Tajo with BI solution, Birst.
> Birst usually generate join query like following:
> select table1.* from table1 inner join (table2) on (table1.id = table2.id);
> If "table2" has parenthesis, Tajo displays follwing error:
> ERROR: syntax error at or near 'table2'
> I didn't check ANSI SQL doesn't allow parenthesis in this case.
> But Almost databases I evaluated support this case.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)