Even if there is no bug about EnumerableHashJoin, since there is no equi 
condition, why generate HashJoin? Should it be NestedLoopJoin?

- Haisheng

------------------------------------------------------------------
发件人:Muhammad Gelbana<m.gelb...@gmail.com>
日 期:2019年06月14日 22:58:28
收件人:dev@calcite.apache.org (dev@calcite.apache.org)<dev@calcite.apache.org>
主 题:Re: Joining two tables while each table returns a single row of nulls

Here it is [1], thanks for the confirmation.

[1] https://issues.apache.org/jira/browse/CALCITE-3128

Thanks,
Gelbana


On Fri, Jun 14, 2019 at 8:55 AM Julian Hyde <jh...@apache.org> wrote:

> It's a bug. Please log it.
>
> I got the following plan, which looks correct.
>
> > explain plan for select * from (select nullif(5,5)), (select
> nullif(5,5));
> EnumerableHashJoin(condition=[true], joinType=[inner])
>   EnumerableCalc(expr#0=[{inputs}], expr#1=[null:INTEGER], EXPR$0=[$t1])
>     EnumerableValues(tuples=[[{ 0 }]])
>   EnumerableCalc(expr#0=[{inputs}], expr#1=[null:INTEGER], EXPR$0=[$t1])
>     EnumerableValues(tuples=[[{ 0 }]])
>
> I suspect that EnumerableHashJoin is doing something wrong during
> execution.
>
> On Thu, Jun 13, 2019 at 10:33 PM Muhammad Gelbana <m.gelb...@gmail.com>
> wrote:
> >
> > I run the following query against MySQL, PostgreSQL and Calcite and found
> > that Calcite returns 0 rows, while the other DBMSs return a single row of
> > two NULLs
> >
> > SELECT * FROM (SELECT NULLIF(5, 5)) a, (SELECT NULLIF(5, 5)) b
> >
> > Is this possibly a bug ? Is there a configuration or something to tweak
> to
> > return the same output MySQL and PostgreSQL without modifying the query ?
> >
> > Thanks,
> > Gelbana
>

Reply via email to