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/10 01:07:18 UTC
[jira] [Resolved] (CALCITE-1083) SqlNode.equalsDeep has O(n ^ 2)
performance
[ https://issues.apache.org/jira/browse/CALCITE-1083?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Julian Hyde resolved CALCITE-1083.
----------------------------------
Resolution: Fixed
Fix Version/s: 1.7.0
Fixed in http://git-wip-us.apache.org/repos/asf/calcite/commit/670fa73e.
> 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
> Fix For: 1.7.0
>
>
> 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)