You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Vladimir Sitnikov (JIRA)" <ji...@apache.org> on 2018/08/30 06:59:00 UTC

[jira] [Created] (CALCITE-2509) RexSimplify: withParanoid(true).verify takes exponential time as number of variables grows

Vladimir Sitnikov created CALCITE-2509:
------------------------------------------

             Summary: RexSimplify: withParanoid(true).verify takes exponential time as number of variables grows
                 Key: CALCITE-2509
                 URL: https://issues.apache.org/jira/browse/CALCITE-2509
             Project: Calcite
          Issue Type: Bug
          Components: core
    Affects Versions: 1.17.0
            Reporter: Vladimir Sitnikov
            Assignee: Julian Hyde


The most trivial case is {{coalesce(v1, v2, v3,...)}}
For instance, it takes 34 seconds to simplify coalesce with 11 inputs.
{noformat}
1, 2 ms, coalesce(vInt(0))
2, 1 ms, coalesce(vInt(0), vInt(1))
3, 3 ms, coalesce(vInt(0), vInt(1), vInt(2))
4, 13 ms, coalesce(vInt(0), vInt(1), vInt(2), vInt(3))
5, 28 ms, coalesce(vInt(0), vInt(1), vInt(2), vInt(3), vInt(4))
6, 80 ms, coalesce(vInt(0), vInt(1), vInt(2), vInt(3), vInt(4), vInt(5))
7, 184 ms, coalesce(vInt(0), vInt(1), vInt(2), vInt(3), vInt(4), vInt(5), vInt(6))
8, 661 ms, coalesce(vInt(0), vInt(1), vInt(2), vInt(3), vInt(4), vInt(5), vInt(6), vInt(7))
9, 1872 ms, coalesce(vInt(0), vInt(1), vInt(2), vInt(3), vInt(4), vInt(5), vInt(6), vInt(7), vInt(8))
10, 7890 ms, coalesce(vInt(0), vInt(1), vInt(2), vInt(3), vInt(4), vInt(5), vInt(6), vInt(7), vInt(8), vInt(9))
11, 33889 ms, coalesce(vInt(0), vInt(1), vInt(2), vInt(3), vInt(4), vInt(5), vInt(6), vInt(7), vInt(8), vInt(9), vIntNotNull(0))
{noformat}




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