Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
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.