[jira] [Updated] (CALCITE-3387) Query with GROUP BY and JOIN ... USING wrongly fails with "Column 'DEPTNO' is ambiguous" error

2019-12-13 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CALCITE-3387?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated CALCITE-3387:

Labels: pull-request-available  (was: )

> Query with GROUP BY and JOIN ... USING wrongly fails with "Column 'DEPTNO' is 
> ambiguous" error
> --
>
> Key: CALCITE-3387
> URL: https://issues.apache.org/jira/browse/CALCITE-3387
> Project: Calcite
>  Issue Type: Bug
>Reporter: Julian Hyde
>Assignee: Chunwei Lei
>Priority: Major
>  Labels: pull-request-available
>
> Query with GROUP BY and JOIN ... USING wrongly fails with "Column 'DEPTNO' is 
> ambiguous" error. Here is the query:
> {code}
> select deptno, count(*)
> from emp
> join dept using (deptno)
> group by deptno;
> {code}
> Because of USING, the two deptno fields should be merged into one, and 
> therefore {{deptno}} is not ambiguous. That query works in Oracle. Also note 
> that
> {code}select deptno
> from emp
> join dept using (deptno)
> {code}
> works correctly in Calcite, and has since CALCITE-2227 was fixed.



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


[jira] [Updated] (CALCITE-3387) Query with GROUP BY and JOIN ... USING wrongly fails with "Column 'DEPTNO' is ambiguous" error

2019-10-04 Thread Julian Hyde (Jira)


 [ 
https://issues.apache.org/jira/browse/CALCITE-3387?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Julian Hyde updated CALCITE-3387:
-
Description: 
Query with GROUP BY and JOIN ... USING wrongly fails with "Column 'DEPTNO' is 
ambiguous" error. Here is the query:
{code}
select deptno, count(*)
from emp
join dept using (deptno)
group by deptno;
{code}

Because of USING, the two deptno fields should be merged into one, and 
therefore {{deptno}} is not ambiguous. That query works in Oracle. Also note 
that

{code}select deptno
from emp
join dept using (deptno)
{code}

works correctly in Calcite, and has since CALCITE-2227 was fixed.

  was:
Query with GROUP BY and JOIN ... USING wrongly fails with "Column 'DEPTNO' is 
ambiguous" error. Here is the query:
{code}
select deptno, count(*)
from emp
join dept using (deptno)
group by deptno;
{code}

Because of USING, the two deptno fields should be merged into one, and 
therefore {{deptno}} is not ambiguous. That query works in Oracle. Also note 
that

{code}select deptno
from emp
join dept using (deptno)
{code}

works correctly, and has since CALCITE-2227 was fixed.


> Query with GROUP BY and JOIN ... USING wrongly fails with "Column 'DEPTNO' is 
> ambiguous" error
> --
>
> Key: CALCITE-3387
> URL: https://issues.apache.org/jira/browse/CALCITE-3387
> Project: Calcite
>  Issue Type: Bug
>Reporter: Julian Hyde
>Priority: Major
>
> Query with GROUP BY and JOIN ... USING wrongly fails with "Column 'DEPTNO' is 
> ambiguous" error. Here is the query:
> {code}
> select deptno, count(*)
> from emp
> join dept using (deptno)
> group by deptno;
> {code}
> Because of USING, the two deptno fields should be merged into one, and 
> therefore {{deptno}} is not ambiguous. That query works in Oracle. Also note 
> that
> {code}select deptno
> from emp
> join dept using (deptno)
> {code}
> works correctly in Calcite, and has since CALCITE-2227 was fixed.



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