Issue Details (XML | Word | Printable)

Key: DERBY-3097
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Bryan Pendleton
Reporter: Bryan Pendleton
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Derby

Unnecessary if statement can be removed from BaseActivation.getColumnFromNow

Created: 03/Oct/07 02:31 AM   Updated: 04/May/09 06:22 PM
Return to search
Component/s: SQL
Affects Version/s: 10.4.1.3
Fix Version/s: 10.5.1.1

Time Tracking:
Not Specified

File Attachments:
  Size
File Licensed for inclusion in ASF works checkNumOpens.diff 2007-10-08 01:21 AM Bryan Pendleton 9 kB
File Licensed for inclusion in ASF works updatedJune2008.diff 2008-06-02 11:44 PM Bryan Pendleton 7 kB
Issue Links:
Reference
 

Resolution Date: 04/Jun/08 02:44 AM


 Description  « Hide
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.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
No work has yet been logged on this issue.