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

Danny Chan commented on CALCITE-3255:
-------------------------------------

Thanks, [~Water Cut Off], this is an expected behavior, The relational node 
cost would be infinite if the convention is NONE, you should first set up your 
desired conventions in the target target traits[1], and define you node 
transform converters[2].

You should also supply the metadata in you convention nodes, so that our 
metadata system can compute the cumulative cost correctly.

 

[1] 
[https://github.com/apache/calcite/blob/a68bfc96bacc95b4b8ab5d185bb5cc1991113769/core/src/main/java/org/apache/calcite/tools/Program.java#L38]

[2] 
https://github.com/apache/calcite/blob/a68bfc96bacc95b4b8ab5d185bb5cc1991113769/core/src/main/java/org/apache/calcite/rel/convert/ConverterRule.java#L35

> CannotPlanException: There are not enough rules to produce a node with 
> desired properties
> -----------------------------------------------------------------------------------------
>
>                 Key: CALCITE-3255
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3255
>             Project: Calcite
>          Issue Type: Bug
>         Environment: !image-2019-08-16-18-09-57-964.png!
>            Reporter: Water Cut Off
>            Priority: Major
>         Attachments: image-2019-08-16-18-09-57-964.png
>
>
> I want to use calcite volcano planner to estimate sql cost,but it doesn't 
> work when i try to test a case,The exception is blow:
> {color:#FF0000}org.apache.calcite.plan.RelOptPlanner$CannotPlanException: 
> There are not enough rules to produce a node with desired properties: 
> convention=NONE, sort=[]. All the inputs have relevant nodes, however the 
> cost is still infinite.{color}
> {color:#FF0000} Root: rel#40:Subset#4.NONE.[]{color}
> {color:#FF0000} Original rel:{color}
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to