Derby
  1. Derby
  2. DERBY-4899

Refactor access to primary structures in AlterTableConstantAction

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 10.7.1.1
    • Fix Version/s: 10.7.1.1
    • Component/s: SQL
    • Labels:
      None

      Description

      Many of the private methods in impl.sql.execute.AlterTableConstantAction take the activation (and sometimes a number of references obtained through it) as an argument. This seems unnecessary, and it clutters the code with argument passing, boilerplate code and variable hiding.

      1. derby-4899-1b-cleanup.diff
        17 kB
        Kristian Waagan
      2. derby-4899-1a-cleanup.diff
        17 kB
        Kristian Waagan

        Activity

        Kristian Waagan created issue -
        Hide
        Kristian Waagan added a comment -

        Attaching patch 1a with suggested cleanup.

        AlterTableConstantAction.java | 197 ++++++++++--------------------------------
        1 file changed, 49 insertions, 148 deletions

        Regression tests passed.
        Patch ready for review.

        Show
        Kristian Waagan added a comment - Attaching patch 1a with suggested cleanup. AlterTableConstantAction.java | 197 ++++++++++-------------------------------- 1 file changed, 49 insertions , 148 deletions Regression tests passed. Patch ready for review.
        Kristian Waagan made changes -
        Field Original Value New Value
        Attachment derby-4899-1a-cleanup.diff [ 12459341 ]
        Hide
        Kristian Waagan added a comment -

        BTW; I made this patch because I'll be changing the update statistics code when adding automatic index statistics updates.

        Show
        Kristian Waagan added a comment - BTW; I made this patch because I'll be changing the update statistics code when adding automatic index statistics updates.
        Kristian Waagan made changes -
        Issue & fix info [Patch Available]
        Hide
        Bryan Pendleton added a comment -

        +1 to simplifying and removing unnecessary code!

        Show
        Bryan Pendleton added a comment - +1 to simplifying and removing unnecessary code!
        Hide
        Dag H. Wanvik added a comment -

        Looks good to me, geez that was really messy.

        Show
        Dag H. Wanvik added a comment - Looks good to me, geez that was really messy.
        Hide
        Kristian Waagan added a comment -

        Attaching patch 1b, which removes another unused variable.
        Note that I have consequently used space for indentation.

        Thanks for looking at the patch, Bryan and Dag.

        Show
        Kristian Waagan added a comment - Attaching patch 1b, which removes another unused variable. Note that I have consequently used space for indentation. Thanks for looking at the patch, Bryan and Dag.
        Kristian Waagan made changes -
        Attachment derby-4899-1b-cleanup.diff [ 12459433 ]
        Hide
        Kristian Waagan added a comment -

        Committed patch 1b to trunk with revision 1034347.

        Show
        Kristian Waagan added a comment - Committed patch 1b to trunk with revision 1034347.
        Kristian Waagan made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Issue & fix info [Patch Available]
        Fix Version/s 10.7.1.0 [ 12314971 ]
        Resolution Fixed [ 1 ]
        Rick Hillegas made changes -
        Affects Version/s 10.7.1.1 [ 12315564 ]
        Affects Version/s 10.7.1.0 [ 12314971 ]
        Fix Version/s 10.7.1.1 [ 12315564 ]
        Fix Version/s 10.7.1.0 [ 12314971 ]
        Hide
        Kristian Waagan added a comment -

        Closing issue.

        Show
        Kristian Waagan added a comment - Closing issue.
        Kristian Waagan made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Gavin made changes -
        Workflow jira [ 12526581 ] Default workflow, editable Closed status [ 12800486 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        23h 31m 1 Kristian Waagan 12/Nov/10 11:30
        Resolved Resolved Closed Closed
        17d 21h 49m 1 Kristian Waagan 30/Nov/10 09:20

          People

          • Assignee:
            Kristian Waagan
            Reporter:
            Kristian Waagan
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development