db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (DERBY-5989) Stop producing byte code for non-existent qualifiers
Date Wed, 14 Nov 2012 09:00:15 GMT

     [ https://issues.apache.org/jira/browse/DERBY-5989?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Knut Anders Hatlen resolved DERBY-5989.

       Resolution: Fixed
    Fix Version/s:

Committed revision 1409120.
> Stop producing byte code for non-existent qualifiers
> ----------------------------------------------------
>                 Key: DERBY-5989
>                 URL: https://issues.apache.org/jira/browse/DERBY-5989
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions:
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>             Fix For:
>         Attachments: after.txt, before.txt, d5989-1a.diff, d5989-1a-no-whitespace.diff
> For all result set nodes that have predicate lists, Derby's compiler lays out byte code
for fields to hold qualifiers, and also code to reinitialize the values in those fields on
every execution. It does this even if there are no qualifiers. See PredicateList.generateQualifiers().
That method does actually check whether there are qualifiers, and it skips some of the code
generation if there are none. It should be changed so that it skips all the code generation
if there are no qualifiers.
> For an example, see the decompiled generated class for a natural join attached to DERBY-5947:
> That class contains three Qualifier[][] fields:
>     private Qualifier[][] e1;
>     private Qualifier[][] e3;
>     private Qualifier[][] e4;
> Only one of them (e4) is ever set to a non-null value. Still, the reinit() method, which
is called on every execution, has code for each of the fields:
>     protected void reinit() throws StandardException {
> 	BaseActivation.reinitializeQualifiers(e1);
> 	BaseActivation.reinitializeQualifiers(e3);
> 	BaseActivation.reinitializeQualifiers(e4);
>     }

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message