db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bryan Pendleton (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (DERBY-3097) Unnecessary if statement can be removed from BaseActivation.getColumnFromNow
Date Wed, 04 Jun 2008 02:46:44 GMT

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

Bryan Pendleton resolved DERBY-3097.
------------------------------------

       Resolution: Fixed
    Fix Version/s: 10.5.0.0

Committed the updated patch to the trunk as revision 662947
and am marking this issue as resolved.

Thanks all for your help!


> Unnecessary if statement can be removed from BaseActivation.getColumnFromNow
> ----------------------------------------------------------------------------
>
>                 Key: DERBY-3097
>                 URL: https://issues.apache.org/jira/browse/DERBY-3097
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 10.4.1.3
>            Reporter: Bryan Pendleton
>            Assignee: Bryan Pendleton
>            Priority: Minor
>             Fix For: 10.5.0.0
>
>         Attachments: checkNumOpens.diff, updatedJune2008.diff
>
>
> In BaseActivation.java there is the following code:
> protected final DataValueDescriptor getColumnFromRow(int rsNumber, int colId)
> throws StandardException {
>         if( row[rsNumber] == null)
>         {
>             /* This actually happens. NoPutResultSetImpl.clearOrderableCache attempts
to prefetch invariant values
>              * into a cache. This fails in some deeply nested joins. See Beetle 4736
and 4880.
>              */
>             return null;
>         }
> return row[rsNumber].getColumn(colId);
> }
> During the investigation of DERBY-3033, I came to the conclusion that this "if" statement
is no longer necessary, and in fact is counter-productive, for it makes diagnosing other problems
harder by delaying the point at which data structure problems are exposed as errors in the
code.
> This JIRA issue requests that this code be evaluated, to determine whether or not it
truly is necessary, and, if it is not necessary, suggests that it should be removed, to result
in simpler, clearer code.

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


Mime
View raw message