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

Julian Hyde commented on CALCITE-1290:
--------------------------------------

The bound could be in terms of number of leaves (counting a leaf twice if it 
occurs in two expressions) or in terms of nodes (leaves plus interior nodes). I 
don't mind which... either would be effective, and one might be easier to 
compute efficiently as the CNF is being built.

> When converting to CNF, fail if the expression exceeds a threshold
> ------------------------------------------------------------------
>
>                 Key: CALCITE-1290
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1290
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Julian Hyde
>            Assignee: Julian Hyde
>
> When converting to conjunctive normal form (CNF), fail if the expression 
> exceeds a threshold. CNF can explode exponentially in the size of the input 
> expression, but rarely does so in practice. Add a {{maxNodeCount}} parameter 
> to {{RexUtil.toCnf}} and throw or return null if it is exceeded.
> I don't believe it is possible to predict the size of the CNF from the input 
> expression (especially if there are duplicate terms) but I might be wrong.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to