calcite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Masayuki Takahashi <>
Subject Re: Volcano Planner - Tree unimplementable
Date Sat, 17 Mar 2018 16:18:57 GMT
Hi, Abbas.

I think that this error cause by "rel#7:Subset#1.ENUMERABLE.[],
best=null, importance=0.5".
This rel was selected at Set#1 because this one is ENUMERABLE and "best=null".

I think that you should convert ENUMERABLE to NativeTeradataConvention
because enumerable convention is default.

To convert ENUMERABLE to NativeTeradataConvention, you should create
ConverterRule and Converter.
In case of Cassandra it is as follows:

And register the ConverterRule.


2018-03-13 18:23 GMT+09:00 Abbas Gadhia <>:
> Hi,
> I'm having problems getting the Volcano Planner to implement my Rel tree. I keep getting
errors like "could not be implemented; planner state"
> My target tree has 2 conventions. The first is what i'm calling a "Native" convention
which is similar to the JdbcConvention in its semantics, but I dont use the JdbcConvention
because it forces me to create JdbcTableScans that need an instance of a live jdbc Datasource.
The second convention I have is called Foo (for lack of a better name), using which I intend
to physically implement or execute my Rel tree.
> Here is my original rel, which i built using a 2 Relbuilders (1 Relbuilder built using
a custom TableScanFactory and the other Relbuilder built using an empty Context i.e default
> LogicalProject
> --NativeTableScan
> To implement this tree, I have a few rules set up such as,
> NativeToFooConverterRule (similar to JdbcToEnumerableConverterRule)
> NativeProjectRule (similar to JdbcProjectRule)
> I register these rules inside of the NativeConvention in the register method (similar
to JdbcConvention). For now, i've hardcoded the cost (row count) of the NativeTable object
(which reside inside RelOptSchema) to be 100. The planner state, after it fails is below.
In case the full log with TRACE levels is needed, i've attached it here.
> java.lang.RuntimeException: org.apache.calcite.plan.RelOptPlanner$CannotPlanException:
Node [rel#4:Subset#1.NONE.[]] could not be implemented; planner state:
> Root: rel#4:Subset#1.NONE.[]
> Original rel:
> LogicalProject(subset=[rel#4:Subset#1.NONE.[]], id=[$0]): rowcount = 100.0, cumulative
cost = {100.0 rows, 100.0 cpu, 0.0 io}, id = 3
>   NativeTableScan(subset=[rel#2:Subset#0.NativeTeradataConvention.[]], table=[[s1, emp]]):
rowcount = 100.0, cumulative cost = {100.0 rows, 101.0 cpu, 0.0 io}, id = 0
> Sets:
> Set#0, type: RecordType(INTEGER id, VARCHAR name, INTEGER department)
>         rel#2:Subset#0.NativeTeradataConvention.[], best=rel#0, importance=0.9
>         rel#0:NativeTableScan.NativeTeradataConvention.[](table=[s1, emp]), rowcount=100.0,
cumulative cost={100.0 rows, 101.0 cpu, 0.0 io}
>     rel#5:Subset#0.ENUMERABLE.[], best=null, importance=0.45
>     rel#15:Subset#0.BeamConvention.[], best=rel#14, importance=0.45
>         rel#14:NativeToBeamConverterRel.BeamConvention.[](input=rel#2:Subset#0.NativeTeradataConvention.[]),
rowcount=100.0, cumulative cost={110.0 rows, 111.0 cpu, 0.0 io}
> Set#1, type: RecordType(INTEGER id)
>         rel#4:Subset#1.NONE.[], best=null, importance=1.0
>         rel#3:LogicalProject.NONE.[](input=rel#2:Subset#0.NativeTeradataConvention.[],id=$0),
rowcount=100.0, cumulative cost={inf}
>     rel#7:Subset#1.ENUMERABLE.[], best=null, importance=0.5
>         rel#6:EnumerableProject.ENUMERABLE.[](input=rel#5:Subset#0.ENUMERABLE.[],id=$0),
rowcount=100.0, cumulative cost={inf}
>     rel#9:Subset#1.NativeTeradataConvention.[], best=rel#8, importance=0.5
>         rel#8:NativeProject.NativeTeradataConvention.[](input=rel#2:Subset#0.NativeTeradataConvention.[],id=$0),
rowcount=100.0, cumulative cost={180.0 rows, 181.0 cpu, 0.0 io}
> rel#11:Subset#1.BeamConvention.[], best=rel#10, importance=0.5
>     rel#10:NativeToBeamConverterRel.BeamConvention.[](input=rel#9:Subset#1.NativeTeradataConvention.[]),
rowcount=100.0, cumulative cost={190.0 rows, 191.0 cpu, 0.0 io}
> I tried referring to this email on the mailing list, but so far no luck.
> Thanks
> Abbas

高橋 真之

View raw message