You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (JIRA)" <ji...@apache.org> on 2016/02/09 23:40:18 UTC
[jira] [Created] (CALCITE-1083) SqlNode.equalsDeep has O(n ^ 2)
performance
Julian Hyde created CALCITE-1083:
------------------------------------
Summary: SqlNode.equalsDeep has O(n ^ 2) performance
Key: CALCITE-1083
URL: https://issues.apache.org/jira/browse/CALCITE-1083
Project: Calcite
Issue Type: Bug
Reporter: Julian Hyde
Assignee: Julian Hyde
SqlNode.equalsDeep has O(n ^ 2) performance. It shows up while running SqlValidatorTest.testLarge on "select from emp where <large expression> > 5".
This is because we call {{litmus.fail(e + " != " + e2)}} and construct a large string, even though the particular implementation of Litmus is not interested in the string.
Solution is to change {{Litmus.fail(String message)}} to {{Litmus.fail(String message, Object... args)}}, so that {{fail}} can lazily construct messages. The same as SLF4J Logger does.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)