You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by Gautam Parai <gp...@mapr.com> on 2018/10/10 18:24:45 UTC

Re: Problem of adding support for CROSS JOIN syntax

Hi Igor,

I saw Arina discuss/propose adding hint support through Calcite. This would
definitely be useful for the usecase you were trying to target. This will
allow the user to selectively apply cross joins without actually
overloading the meaning on "CROSS JOIN" to bypass the
planner.enable_nljoin_for_scalar_only option.

Gautam

On Fri, Sep 28, 2018 at 12:01 AM Ihor Huzenko <ih...@gmail.com>
wrote:

> Hello Hanumath,
>
> Thanks for joining the conversation. Let's consider such example:
>
> SELECT * FROM
>            cp.`tpch/nation.parquet` a,
>            cp.`tpch/nation.parquet` b
> CROSS JOIN cp.`tpch/nation.parquet` c;
>
> For my task I want to allow cross join for relations *b* and *c* regardless
> whether *planner.enable_nljoin_for_scalar_only *
> is set to false or true. But another implicit cross join of *a* and
> (*b*x*c*)
> should depend on the option, and it must fail when option set to true.
>
> Such distinction between explicit and implicit cross joins is necessary,
> because when user typing in cross join explicitly it
> means that he knows what he is doing. But when cross join is implicit, it
> may be that user simply forgot to add condition.
> And may result in large amount of rows and potential out of memory errors.
>
>
> пт, 28 вер. 2018 о 00:42 Hanumath Rao Maduri <ha...@gmail.com> пише:
>
> > Hello Ihor,
> >
> > I am not clear on the mentioned goal of this JIRA. Can you please clarify
> > on this using some examples.
> > "But main goal of this task is to allow explicit cross joins in queries
> > when option is enabled and at the same time disallow other ways to
> execute
> > cross joins (for example, list tables via comma in FROM section of query
> > without condition) while option is enabled.  "
> > At-least from what I understand regarding the support of cross joins, is
> to
> > enable the cross join whenever a comma separated syntax without
> conditions
> > are also enabled. Currently cross join is not supported at all.
> >
> > It's support should be similar to that of comma separated query syntax
> > without conditions.
> >
> > Thanks,
> > -Hanu
> >
> >
> >
> > On Thu, Sep 27, 2018 at 10:14 AM Ihor Huzenko <
> ihor.huzenko.igs@gmail.com>
> > wrote:
> >
> > > Dear Drillers,
> > >
> > > I'm trying to implement support for CROSS JOIN syntax in Apache Drill.
> > > But after long investigation I finally run out of ideas and don't see
> > > proper way
> > > how this could be implemented without changes to Calcite. I'm new to
> > Drill
> > > and
> > > Calcite and I would appreciate any help. Please, take a look at my
> > comment
> > > under the issue
> https://urldefense.proofpoint.com/v2/url?u=https-3A__issues.apache.org_jira_browse_DRILL-2D786&d=DwIFaQ&c=cskdkSMqhcnjZxdQVpwTXg&r=jGaWXfAULy7L7yLSDM6rFQ&m=9RpggEwZH2PQXPhcZcubonSrBtWNrF-nptq4z_I5XtM&s=gCg-pDruKIxRnIhAC6uml_cd8BSffusY7KWA58VImko&e=
> .
> > >
> > > Thank you in advance, Igor Guzenko
> > >
> >
>