Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-1290

When converting to CNF, fail if the expression size exceeds a threshold

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.9.0
    • Component/s: None
    • Labels:
      None

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jcamachorodriguez Jesus Camacho Rodriguez
                Reporter:
                julianhyde Julian Hyde
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: