calcite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julian Hyde <julianh...@gmail.com>
Subject Re: Custom properties e.g. in cluster
Date Thu, 12 Mar 2015 07:42:04 GMT
Yes, Context.

You can create your own class containing a bundle of properties you
are interested in, put an instance inside a Context (so that it gets
returned if someone calls Context.unwrap(YourClass.class)) and pass
that Context to your planner's constructor.

It will be available via RelOptPlanner.getContext(), hence available
in every RelNode (via cluster) and in every RelOptRuleCall.

See interface org.apache.calcite.plan.Context,
class org.apache.calcite.plan.Contexts.

You could add a method to Contexts to chain several Context instances
together, if it helps.

Julian


On Wed, Mar 11, 2015 at 4:30 PM, Jesus Camachorodriguez
<jcamachorodriguez@hortonworks.com> wrote:
> Hello,
>
> Is there a way already implemented in Calcite to register properties e.g. max memory
size, max split size, in the cluster so they can be used all over the optimization process?
>
> Thanks,
> Jesús

Mime
View raw message