[ 
https://issues.apache.org/jira/browse/CALCITE-2817?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16778921#comment-16778921
 ] 

Vladimir Sitnikov commented on CALCITE-2817:
--------------------------------------------

Eh, there's an issue with rel placement (see  !values_vs_subset_placement.png!  
)

The example comes from CALCITE-2592, and raw output is
{noformat}Set#1, type: RecordType(CHAR(1) id, CHAR(1) name)
        rel#4:Subset#1.NONE.[], best=null, importance=0.81
                rel#1:LogicalValues.NONE.[[0, 1], [1]](type=RecordType(CHAR(1) 
id, CHAR(1) name),tuples=[{ '1', 'x' }, { '2', 'y' }]), rowcount=2.0, 
cumulative cost={inf}
        rel#10:Subset#1.ENUMERABLE.[0], best=rel#21, importance=0.9
                rel#21:EnumerableValues.ENUMERABLE.[[0, 1], 
[1]](type=RecordType(CHAR(1) id, CHAR(1) name),tuples=[{ '1', 'x' }, { '2', 'y' 
}]), rowcount=2.0, cumulative cost={2.0 rows, 1.0 cpu, 0.0 io}
        rel#22:Subset#1.ENUMERABLE.[], best=rel#21, importance=0.45
                rel#21:EnumerableValues.ENUMERABLE.[[0, 1], 
[1]](type=RecordType(CHAR(1) id, CHAR(1) name),tuples=[{ '1', 'x' }, { '2', 'y' 
}]), rowcount=2.0, cumulative cost={2.0 rows, 1.0 cpu, 0.0 io}
{noformat}

It should put the rel under the most specific subset, and it should add extra 
links if the rel satisfies other subsets.

> Make CannotPlanException great
> ------------------------------
>
>                 Key: CALCITE-2817
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2817
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.18.0
>            Reporter: Vladimir Sitnikov
>            Assignee: Julian Hyde
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.19.0
>
>         Attachments: converters.png, running_rule.png, subsets.png, 
> values_vs_subset_placement.png
>
>          Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> 1) Empty subsets are the typical offenders for CannotPlan, so identify them 
> and print before printing the planner dump
> 2) Print Graphviz-compatible output as well so the output is easier to 
> understand
> It would probably make sense to expose leafmost empty subsets via 
> {{Set<RelSubset> CannotPlanExeption#getDeadSubsets()}}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to