You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by Steven Phillips <sp...@maprtech.com> on 2015/04/11 01:23:07 UTC

[DISCUSS] improve physical plan formatting

I find the current format for physical plans, where we indent for every
operator, but keep both sides of the join at the same indentation the same,
is very difficult to read, especially when we have several joins.

I think it would be easier to read if we kept sequential operators at the
same indentation, but increased indentation only when there is a join, and
include some marks to show the connection between the sides of the join and
the join operator.

I created a gist with an example:

https://gist.github.com/StevenMPhillips/74a6bf655175aabd14c0



-- 
 Steven Phillips
 Software Engineer

 mapr.com

Re: [DISCUSS] improve physical plan formatting

Posted by Julian Hyde <ju...@gmail.com>.
+1

I have no idea whether you use Calcite for formatting plans or use Drill code. If the former, I’d be happy to accept a patch to Calcite that allows this as a formatting option for Calcite plan. 

Anyone have a good descriptive name for this format? Steven, were you inspired by some other system that uses this format?

Julian


On Apr 13, 2015, at 9:44 AM, Jason Altekruse <al...@gmail.com> wrote:

> +1
> 
> On Fri, Apr 10, 2015 at 11:23 PM, Aditya <ad...@gmail.com> wrote:
> 
>> This looks much neater and makes it easy to keep track of.
>> 
>> On Fri, Apr 10, 2015 at 4:23 PM, Steven Phillips <sp...@maprtech.com>
>> wrote:
>> 
>>> I find the current format for physical plans, where we indent for every
>>> operator, but keep both sides of the join at the same indentation the
>> same,
>>> is very difficult to read, especially when we have several joins.
>>> 
>>> I think it would be easier to read if we kept sequential operators at the
>>> same indentation, but increased indentation only when there is a join,
>> and
>>> include some marks to show the connection between the sides of the join
>> and
>>> the join operator.
>>> 
>>> I created a gist with an example:
>>> 
>>> https://gist.github.com/StevenMPhillips/74a6bf655175aabd14c0
>>> 
>>> 
>>> 
>>> --
>>> Steven Phillips
>>> Software Engineer
>>> 
>>> mapr.com
>>> 
>> 


Re: [DISCUSS] improve physical plan formatting

Posted by Jason Altekruse <al...@gmail.com>.
+1

On Fri, Apr 10, 2015 at 11:23 PM, Aditya <ad...@gmail.com> wrote:

> This looks much neater and makes it easy to keep track of.
>
> On Fri, Apr 10, 2015 at 4:23 PM, Steven Phillips <sp...@maprtech.com>
> wrote:
>
> > I find the current format for physical plans, where we indent for every
> > operator, but keep both sides of the join at the same indentation the
> same,
> > is very difficult to read, especially when we have several joins.
> >
> > I think it would be easier to read if we kept sequential operators at the
> > same indentation, but increased indentation only when there is a join,
> and
> > include some marks to show the connection between the sides of the join
> and
> > the join operator.
> >
> > I created a gist with an example:
> >
> > https://gist.github.com/StevenMPhillips/74a6bf655175aabd14c0
> >
> >
> >
> > --
> >  Steven Phillips
> >  Software Engineer
> >
> >  mapr.com
> >
>

Re: [DISCUSS] improve physical plan formatting

Posted by Aditya <ad...@gmail.com>.
This looks much neater and makes it easy to keep track of.

On Fri, Apr 10, 2015 at 4:23 PM, Steven Phillips <sp...@maprtech.com>
wrote:

> I find the current format for physical plans, where we indent for every
> operator, but keep both sides of the join at the same indentation the same,
> is very difficult to read, especially when we have several joins.
>
> I think it would be easier to read if we kept sequential operators at the
> same indentation, but increased indentation only when there is a join, and
> include some marks to show the connection between the sides of the join and
> the join operator.
>
> I created a gist with an example:
>
> https://gist.github.com/StevenMPhillips/74a6bf655175aabd14c0
>
>
>
> --
>  Steven Phillips
>  Software Engineer
>
>  mapr.com
>

Re: [DISCUSS] improve physical plan formatting

Posted by Jinfeng Ni <jn...@apache.org>.
+1.

Increased indentation is required not only for join, but for any operator
which takes more than 1 inputs.  Union / Union All would be another
example.



On Mon, Apr 13, 2015 at 12:39 PM, Tomer Shiran <ts...@gmail.com> wrote:

> +1
>
>
> On Fri, Apr 10, 2015 at 4:23 PM, Steven Phillips <sp...@maprtech.com>
> wrote:
>
> > I find the current format for physical plans, where we indent for every
> > operator, but keep both sides of the join at the same indentation the
> same,
> > is very difficult to read, especially when we have several joins.
> >
> > I think it would be easier to read if we kept sequential operators at the
> > same indentation, but increased indentation only when there is a join,
> and
> > include some marks to show the connection between the sides of the join
> and
> > the join operator.
> >
> > I created a gist with an example:
> >
> > https://gist.github.com/StevenMPhillips/74a6bf655175aabd14c0
> >
> >
> >
> > --
> >  Steven Phillips
> >  Software Engineer
> >
> >  mapr.com
> >
>

Re: [DISCUSS] improve physical plan formatting

Posted by Tomer Shiran <ts...@gmail.com>.
+1


On Fri, Apr 10, 2015 at 4:23 PM, Steven Phillips <sp...@maprtech.com>
wrote:

> I find the current format for physical plans, where we indent for every
> operator, but keep both sides of the join at the same indentation the same,
> is very difficult to read, especially when we have several joins.
>
> I think it would be easier to read if we kept sequential operators at the
> same indentation, but increased indentation only when there is a join, and
> include some marks to show the connection between the sides of the join and
> the join operator.
>
> I created a gist with an example:
>
> https://gist.github.com/StevenMPhillips/74a6bf655175aabd14c0
>
>
>
> --
>  Steven Phillips
>  Software Engineer
>
>  mapr.com
>