David Wayne Birdsall created TRAFODION-3326:
-----------------------------------------------

             Summary: Rewrite logsort utility
                 Key: TRAFODION-3326
                 URL: https://issues.apache.org/jira/browse/TRAFODION-3326
             Project: Apache Trafodion
          Issue Type: Improvement
          Components: dev-environment
    Affects Versions: 2.4
            Reporter: David Wayne Birdsall
            Assignee: David Wayne Birdsall


The logsort utility is used by the Trafodion development regression tests to 
sort sqlci log output for SELECT statements that lack ORDER BY clauses. This is 
done so that non-determinism in the order that rows are listed does not cause 
false failures when comparing expected results with actual results.

This utility was written (by me as luck would have it) around 1990 or so in C. 
It is object-oriented in design, and so could easily be rewritten using C++ 
classes. Too, it manually implements things such as linked lists that could be 
replaced with C++ STL templates.

The most compelling reason to do a rewrite is that it uses the equivalent of a 
bubble sort when sorting output. For most of our test results this is not an 
issue; the number of rows listed in a typical test is usually in the tens or 
less. But if there is a bug (either in the engine itself or in the testware), 
we may get millions or rows or more. When this happens, logsort may run for 
hours. So it would  be good to replace the existing o(n^2) sort with a more 
efficient one, perhaps using STL for this purpose.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Reply via email to