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 "Daniel John Debrunner (JIRA)" <de...@db.apache.org> on 2006/08/15 22:23:13 UTC

[jira] Created: (DERBY-1700) Remove passing of closeCleanup method to every ResultSet type since only the top ResultSet requires it.

Remove passing of closeCleanup method to every ResultSet type since only the top ResultSet requires it.
-------------------------------------------------------------------------------------------------------

                 Key: DERBY-1700
                 URL: http://issues.apache.org/jira/browse/DERBY-1700
             Project: Derby
          Issue Type: Improvement
          Components: SQL
            Reporter: Daniel John Debrunner
         Assigned To: Daniel John Debrunner
            Priority: Minor


A UNION node will generate byte code to call this method:

NoPutResultSet getUnionResultSet(NoPutResultSet source1,
NoPutResultSet source2,
Activation activation,
int resultSetNumber,
double optimizerEstimatedRowCount,
double optimizerEstimatedCost,
GeneratedMethod closeCleanup)

The closeCleanup method is passed in as null for all result sets in a tree except the top one. Instead of passing it on each new result set, it would be much more efficient to have a setCloseMethod() that is only called once for the top result set.  Could also look at having an closeCleanup method in the interface and call it directly, rather than through reflection.

This applies to any node that takes a closeCleanup method.

Split out from DERBY-766


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (DERBY-1700) Remove passing of closeCleanup method to every ResultSet type since only the top ResultSet requires it.

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

Daniel John Debrunner closed DERBY-1700.
----------------------------------------


> Remove passing of closeCleanup method to every ResultSet type since only the top ResultSet requires it.
> -------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1700
>                 URL: https://issues.apache.org/jira/browse/DERBY-1700
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>            Reporter: Daniel John Debrunner
>         Assigned To: Daniel John Debrunner
>            Priority: Minor
>             Fix For: 10.2.1.6, 10.3.0.0
>
>         Attachments: derby1700_diff_p1.txt, derby1700_diff_p2.txt, derby1700_diff_p3.txt
>
>
> A UNION node will generate byte code to call this method:
> NoPutResultSet getUnionResultSet(NoPutResultSet source1,
> NoPutResultSet source2,
> Activation activation,
> int resultSetNumber,
> double optimizerEstimatedRowCount,
> double optimizerEstimatedCost,
> GeneratedMethod closeCleanup)
> The closeCleanup method is passed in as null for all result sets in a tree except the top one. Instead of passing it on each new result set, it would be much more efficient to have a setCloseMethod() that is only called once for the top result set.  Could also look at having an closeCleanup method in the interface and call it directly, rather than through reflection.
> This applies to any node that takes a closeCleanup method.
> Split out from DERBY-766

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-1700) Remove passing of closeCleanup method to every ResultSet type since only the top ResultSet requires it.

Posted by "Daniel John Debrunner (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1700?page=comments#action_12432250 ] 
            
Daniel John Debrunner commented on DERBY-1700:
----------------------------------------------

E-mail thread on the actual fact that the close cleanup method is overly complex and provides basically no benefit.

http://mail-archives.apache.org/mod_mbox/db-derby-dev/200608.mbox/%3c44F766E2.4000304@apache.org%3e

Will attach a series of patches that address this incrementally.

> Remove passing of closeCleanup method to every ResultSet type since only the top ResultSet requires it.
> -------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1700
>                 URL: http://issues.apache.org/jira/browse/DERBY-1700
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>            Reporter: Daniel John Debrunner
>         Assigned To: Daniel John Debrunner
>            Priority: Minor
>
> A UNION node will generate byte code to call this method:
> NoPutResultSet getUnionResultSet(NoPutResultSet source1,
> NoPutResultSet source2,
> Activation activation,
> int resultSetNumber,
> double optimizerEstimatedRowCount,
> double optimizerEstimatedCost,
> GeneratedMethod closeCleanup)
> The closeCleanup method is passed in as null for all result sets in a tree except the top one. Instead of passing it on each new result set, it would be much more efficient to have a setCloseMethod() that is only called once for the top result set.  Could also look at having an closeCleanup method in the interface and call it directly, rather than through reflection.
> This applies to any node that takes a closeCleanup method.
> Split out from DERBY-766

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-1700) Remove passing of closeCleanup method to every ResultSet type since only the top ResultSet requires it.

Posted by "Daniel John Debrunner (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1700?page=all ]

Daniel John Debrunner updated DERBY-1700:
-----------------------------------------

    Attachment: derby1700_diff_p3.txt

Patch derby1700_diff_p3.txt - will commit soon, all tests pass.

Next step that changes the methods in ResultSetFactory not to have a closeCleanup method parameter which due to the previous patches was always being passed in as null. Changed all callers to not pass the null and thus remove the closeMethodArgument in ResultSetNode.

Since most of the calls are to ResultSetFactory  methods are by generated code cannot rely on compile time checks to ensure all callers are correct. Needed to reduced the argument count by one for the generated method call for any getXXXResultSet that no longer passes the closeCleanup (null) argument.  Have confidence in the change as derbyall passes and the code coverage numbers at http://wiki.apache.org/db-derby/CodeCoverage show complete coverage of these factory methods except for ones related to VTIs.

> Remove passing of closeCleanup method to every ResultSet type since only the top ResultSet requires it.
> -------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1700
>                 URL: http://issues.apache.org/jira/browse/DERBY-1700
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>            Reporter: Daniel John Debrunner
>         Assigned To: Daniel John Debrunner
>            Priority: Minor
>         Attachments: derby1700_diff_p1.txt, derby1700_diff_p2.txt, derby1700_diff_p3.txt
>
>
> A UNION node will generate byte code to call this method:
> NoPutResultSet getUnionResultSet(NoPutResultSet source1,
> NoPutResultSet source2,
> Activation activation,
> int resultSetNumber,
> double optimizerEstimatedRowCount,
> double optimizerEstimatedCost,
> GeneratedMethod closeCleanup)
> The closeCleanup method is passed in as null for all result sets in a tree except the top one. Instead of passing it on each new result set, it would be much more efficient to have a setCloseMethod() that is only called once for the top result set.  Could also look at having an closeCleanup method in the interface and call it directly, rather than through reflection.
> This applies to any node that takes a closeCleanup method.
> Split out from DERBY-766

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (DERBY-1700) Remove passing of closeCleanup method to every ResultSet type since only the top ResultSet requires it.

Posted by "Daniel John Debrunner (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1700?page=all ]

Daniel John Debrunner resolved DERBY-1700.
------------------------------------------

    Fix Version/s: 10.2.1.0
                   10.3.0.0
       Resolution: Fixed

Fixed in trunk and merged to 10.2 by Rick.

> Remove passing of closeCleanup method to every ResultSet type since only the top ResultSet requires it.
> -------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1700
>                 URL: http://issues.apache.org/jira/browse/DERBY-1700
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>            Reporter: Daniel John Debrunner
>         Assigned To: Daniel John Debrunner
>            Priority: Minor
>             Fix For: 10.2.1.0, 10.3.0.0
>
>         Attachments: derby1700_diff_p1.txt, derby1700_diff_p2.txt, derby1700_diff_p3.txt
>
>
> A UNION node will generate byte code to call this method:
> NoPutResultSet getUnionResultSet(NoPutResultSet source1,
> NoPutResultSet source2,
> Activation activation,
> int resultSetNumber,
> double optimizerEstimatedRowCount,
> double optimizerEstimatedCost,
> GeneratedMethod closeCleanup)
> The closeCleanup method is passed in as null for all result sets in a tree except the top one. Instead of passing it on each new result set, it would be much more efficient to have a setCloseMethod() that is only called once for the top result set.  Could also look at having an closeCleanup method in the interface and call it directly, rather than through reflection.
> This applies to any node that takes a closeCleanup method.
> Split out from DERBY-766

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-1700) Remove passing of closeCleanup method to every ResultSet type since only the top ResultSet requires it.

Posted by "Daniel John Debrunner (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1700?page=all ]

Daniel John Debrunner updated DERBY-1700:
-----------------------------------------

    Attachment: derby1700_diff_p2.txt

Patch the removes closeCleanup from ResultSet implementations:

- remove any field storing the reference to a close cleanup method
- remove any calling of the method
- remove passing the reference to the method in the constructor.

Will commit soon, tests all pass.

next step will be to remove the passing of the null reference into the ResultSetFactory interface.

> Remove passing of closeCleanup method to every ResultSet type since only the top ResultSet requires it.
> -------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1700
>                 URL: http://issues.apache.org/jira/browse/DERBY-1700
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>            Reporter: Daniel John Debrunner
>         Assigned To: Daniel John Debrunner
>            Priority: Minor
>         Attachments: derby1700_diff_p1.txt, derby1700_diff_p2.txt
>
>
> A UNION node will generate byte code to call this method:
> NoPutResultSet getUnionResultSet(NoPutResultSet source1,
> NoPutResultSet source2,
> Activation activation,
> int resultSetNumber,
> double optimizerEstimatedRowCount,
> double optimizerEstimatedCost,
> GeneratedMethod closeCleanup)
> The closeCleanup method is passed in as null for all result sets in a tree except the top one. Instead of passing it on each new result set, it would be much more efficient to have a setCloseMethod() that is only called once for the top result set.  Could also look at having an closeCleanup method in the interface and call it directly, rather than through reflection.
> This applies to any node that takes a closeCleanup method.
> Split out from DERBY-766

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-1700) Remove passing of closeCleanup method to every ResultSet type since only the top ResultSet requires it.

Posted by "Daniel John Debrunner (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1700?page=all ]

Daniel John Debrunner updated DERBY-1700:
-----------------------------------------

    Attachment: derby1700_diff_p1.txt

Patch that removes the generation of the close cleanup method in the generated class.
Always pass null to the ResultSetFactoryMethods to indicate no cleanup method (so none is ever called)

Cleanup method is not required as the execute method has generated code to reset/forgt the current time handling.
Only benefit is to null out three objects for possible early garbage collection.

This is a first patch using incremental development. I will commit soon, all tests have passed.

> Remove passing of closeCleanup method to every ResultSet type since only the top ResultSet requires it.
> -------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1700
>                 URL: http://issues.apache.org/jira/browse/DERBY-1700
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>            Reporter: Daniel John Debrunner
>         Assigned To: Daniel John Debrunner
>            Priority: Minor
>         Attachments: derby1700_diff_p1.txt
>
>
> A UNION node will generate byte code to call this method:
> NoPutResultSet getUnionResultSet(NoPutResultSet source1,
> NoPutResultSet source2,
> Activation activation,
> int resultSetNumber,
> double optimizerEstimatedRowCount,
> double optimizerEstimatedCost,
> GeneratedMethod closeCleanup)
> The closeCleanup method is passed in as null for all result sets in a tree except the top one. Instead of passing it on each new result set, it would be much more efficient to have a setCloseMethod() that is only called once for the top result set.  Could also look at having an closeCleanup method in the interface and call it directly, rather than through reflection.
> This applies to any node that takes a closeCleanup method.
> Split out from DERBY-766

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira