You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by "Serafeim (Makis) Papadias" <ma...@gmail.com> on 2019/11/12 21:37:37 UTC

Top-down pass of an optimized plan

Dear all,

I am performing a Volcano optimisation pass first and I receive the root of the optimised plan from the standard Program in [1]. Afterwards, I want to perform a top-down pass to the optimised plan and change it a bit by placing certain operators at specific points.

Do you have any ideas on how to do this properly in Calcite?

Thanks in advance.

Best,
Makis


[1] — https://calcite.apache.org/apidocs/org/apache/calcite/tools/Programs.html <https://calcite.apache.org/apidocs/org/apache/calcite/tools/Programs.html>

Re: Top-down pass of an optimized plan

Posted by Stamatis Zampetakis <za...@gmail.com>.
Hi Makis,

+1 to Haisheng said!

Apart from HepPlanner, another class that is used often for pre/post
processing a plan is RelShuttle [1].

Best,
Stamatis

[1]
https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/rel/RelShuttle.java

On Tue, Nov 12, 2019 at 11:22 PM Serafeim (Makis) Papadias <
makisntpap@gmail.com> wrote:

> Thanks a lot Haisheng.
>
> I will try it and come back to you if I have some further questions. :)
>
> Best,
> Makis
>
> > On 12 Nov 2019, at 11:04 PM, Haisheng Yuan <h....@alibaba-inc.com>
> wrote:
> >
> > Hi Makis,
> >
> > You can use HepPlanner and your customized transoformation rule to
> rewrite the optimized plan. Top-down or Bottom-up can also be specified.
> > Many systems have this kind of post processing phase.
> >
> > - Haisheng
> >
> > ------------------------------------------------------------------
> > 发件人:Serafeim (Makis) Papadias<ma...@gmail.com>
> > 日 期:2019年11月13日 05:37:37
> > 收件人:<de...@calcite.apache.org>
> > 主 题:Top-down pass of an optimized plan
> >
> > Dear all,
> >
> > I am performing a Volcano optimisation pass first and I receive the root
> of the optimised plan from the standard Program in [1]. Afterwards, I want
> to perform a top-down pass to the optimised plan and change it a bit by
> placing certain operators at specific points.
> >
> > Do you have any ideas on how to do this properly in Calcite?
> >
> > Thanks in advance.
> >
> > Best,
> > Makis
> >
> >
> > [1] —
> https://calcite.apache.org/apidocs/org/apache/calcite/tools/Programs.html
> <https://calcite.apache.org/apidocs/org/apache/calcite/tools/Programs.html
> >
>
>

Re: Top-down pass of an optimized plan

Posted by "Serafeim (Makis) Papadias" <ma...@gmail.com>.
Thanks a lot Haisheng.

I will try it and come back to you if I have some further questions. :)

Best,
Makis

> On 12 Nov 2019, at 11:04 PM, Haisheng Yuan <h....@alibaba-inc.com> wrote:
> 
> Hi Makis,
> 
> You can use HepPlanner and your customized transoformation rule to rewrite the optimized plan. Top-down or Bottom-up can also be specified.
> Many systems have this kind of post processing phase. 
> 
> - Haisheng
> 
> ------------------------------------------------------------------
> 发件人:Serafeim (Makis) Papadias<ma...@gmail.com>
> 日 期:2019年11月13日 05:37:37
> 收件人:<de...@calcite.apache.org>
> 主 题:Top-down pass of an optimized plan
> 
> Dear all,
> 
> I am performing a Volcano optimisation pass first and I receive the root of the optimised plan from the standard Program in [1]. Afterwards, I want to perform a top-down pass to the optimised plan and change it a bit by placing certain operators at specific points.
> 
> Do you have any ideas on how to do this properly in Calcite?
> 
> Thanks in advance.
> 
> Best,
> Makis
> 
> 
> [1] — https://calcite.apache.org/apidocs/org/apache/calcite/tools/Programs.html <https://calcite.apache.org/apidocs/org/apache/calcite/tools/Programs.html>


Re: Top-down pass of an optimized plan

Posted by Haisheng Yuan <h....@alibaba-inc.com>.
Hi Makis,

You can use HepPlanner and your customized transoformation rule to rewrite the optimized plan. Top-down or Bottom-up can also be specified.
Many systems have this kind of post processing phase. 

- Haisheng

------------------------------------------------------------------
发件人:Serafeim (Makis) Papadias<ma...@gmail.com>
日 期:2019年11月13日 05:37:37
收件人:<de...@calcite.apache.org>
主 题:Top-down pass of an optimized plan

Dear all,

I am performing a Volcano optimisation pass first and I receive the root of the optimised plan from the standard Program in [1]. Afterwards, I want to perform a top-down pass to the optimised plan and change it a bit by placing certain operators at specific points.

Do you have any ideas on how to do this properly in Calcite?

Thanks in advance.

Best,
Makis


[1] — https://calcite.apache.org/apidocs/org/apache/calcite/tools/Programs.html <https://calcite.apache.org/apidocs/org/apache/calcite/tools/Programs.html>