You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Knut Anders Hatlen (JIRA)" <ji...@apache.org> on 2011/06/23 10:33:48 UTC

[jira] [Created] (DERBY-5293) Replace bubble sort in DataDictionaryImpl and CreateTriggerNode with Collections.sort()

Replace bubble sort in DataDictionaryImpl and CreateTriggerNode with Collections.sort()
---------------------------------------------------------------------------------------

                 Key: DERBY-5293
                 URL: https://issues.apache.org/jira/browse/DERBY-5293
             Project: Derby
          Issue Type: Improvement
          Components: SQL
    Affects Versions: 10.9.0.0
            Reporter: Knut Anders Hatlen
            Assignee: Knut Anders Hatlen
            Priority: Minor


DataDictionaryImpl and CreateTriggerNode contain implementations of bubble sort that could be replaced by calls to Collections.sort(). This isn't performance critical code (it's only used for sorting vectors of column references or table nodes at compile time) so there shouldn't be much to gain by hand-coding the sorting. Using Collections.sort() has the benefits that it results in less code and that the implementation has probably gone through more testing than our hand-coded one.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (DERBY-5293) Replace bubble sort in DataDictionaryImpl and CreateTriggerNode with Collections.sort()

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5293?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen updated DERBY-5293:
--------------------------------------

    Attachment: d5293.diff

Attaching patch that removes the manual sorting and uses Collections.sort() instead.

All the regression tests ran cleanly with the patch.

> Replace bubble sort in DataDictionaryImpl and CreateTriggerNode with Collections.sort()
> ---------------------------------------------------------------------------------------
>
>                 Key: DERBY-5293
>                 URL: https://issues.apache.org/jira/browse/DERBY-5293
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 10.9.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>         Attachments: d5293.diff
>
>
> DataDictionaryImpl and CreateTriggerNode contain implementations of bubble sort that could be replaced by calls to Collections.sort(). This isn't performance critical code (it's only used for sorting vectors of column references or table nodes at compile time) so there shouldn't be much to gain by hand-coding the sorting. Using Collections.sort() has the benefits that it results in less code and that the implementation has probably gone through more testing than our hand-coded one.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (DERBY-5293) Replace bubble sort in DataDictionaryImpl and CreateTriggerNode with Collections.sort()

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5293?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen updated DERBY-5293:
--------------------------------------

    Issue & fix info: [Patch Available]

> Replace bubble sort in DataDictionaryImpl and CreateTriggerNode with Collections.sort()
> ---------------------------------------------------------------------------------------
>
>                 Key: DERBY-5293
>                 URL: https://issues.apache.org/jira/browse/DERBY-5293
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 10.9.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>         Attachments: d5293.diff
>
>
> DataDictionaryImpl and CreateTriggerNode contain implementations of bubble sort that could be replaced by calls to Collections.sort(). This isn't performance critical code (it's only used for sorting vectors of column references or table nodes at compile time) so there shouldn't be much to gain by hand-coding the sorting. Using Collections.sort() has the benefits that it results in less code and that the implementation has probably gone through more testing than our hand-coded one.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (DERBY-5293) Replace bubble sort in DataDictionaryImpl and CreateTriggerNode with Collections.sort()

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5293?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen closed DERBY-5293.
-------------------------------------

          Resolution: Fixed
       Fix Version/s: 10.9.0.0
    Issue & fix info:   (was: [Patch Available])

Committed revision 1141005.

> Replace bubble sort in DataDictionaryImpl and CreateTriggerNode with Collections.sort()
> ---------------------------------------------------------------------------------------
>
>                 Key: DERBY-5293
>                 URL: https://issues.apache.org/jira/browse/DERBY-5293
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 10.9.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>             Fix For: 10.9.0.0
>
>         Attachments: d5293.diff
>
>
> DataDictionaryImpl and CreateTriggerNode contain implementations of bubble sort that could be replaced by calls to Collections.sort(). This isn't performance critical code (it's only used for sorting vectors of column references or table nodes at compile time) so there shouldn't be much to gain by hand-coding the sorting. Using Collections.sort() has the benefits that it results in less code and that the implementation has probably gone through more testing than our hand-coded one.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira