db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r598483 - /db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/
Date Tue, 27 Nov 2007 00:51:01 GMT
Author: djd
Date: Mon Nov 26 16:50:58 2007
New Revision: 598483

URL: http://svn.apache.org/viewvc?rev=598483&view=rev
Log:
Clean up code where NoPutResultSetImpl.setCurrentRow() was called and the caller set currentRow
field explictly. The setCurrentRow() method actually sets the currentRow field.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/AnyResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/BulkTableScanResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DistinctScalarAggregateResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DistinctScanResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericAggregateResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/HashScanResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/HashTableResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/LastIndexKeyResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/MaterializedResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/NormalizeResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/OnceResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ScalarAggregateResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ScrollInsensitiveResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/SetOpResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/UnionResultSet.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/AnyResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/AnyResultSet.java?rev=598483&r1=598482&r2=598483&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/AnyResultSet.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/AnyResultSet.java Mon
Nov 26 16:50:58 2007
@@ -184,7 +184,6 @@
 			}
 	    }
 
-		currentRow = result;
 		setCurrentRow(result);
 		rowsSeen++;
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/BulkTableScanResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/BulkTableScanResultSet.java?rev=598483&r1=598482&r2=598483&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/BulkTableScanResultSet.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/BulkTableScanResultSet.java
Mon Nov 26 16:50:58 2007
@@ -281,7 +281,7 @@
 				{
 					if (reloadArray() == OUT_OF_ROWS)
 					{
-						setCurrentRow(null);
+						clearCurrentRow();
 						setRowCountIfPossible(rowsThisScan);
 						return null;
 					}

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DistinctScalarAggregateResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DistinctScalarAggregateResultSet.java?rev=598483&r1=598482&r2=598483&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DistinctScalarAggregateResultSet.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DistinctScalarAggregateResultSet.java
Mon Nov 26 16:50:58 2007
@@ -212,7 +212,6 @@
 			if (countOfRows == 0)
 			{
 				aggResult = finishAggregation(aggResult);
-				currentRow = aggResult;
 				setCurrentRow(aggResult);
 				countOfRows++;
 			}

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DistinctScanResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DistinctScanResultSet.java?rev=598483&r1=598482&r2=598483&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DistinctScanResultSet.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DistinctScanResultSet.java
Mon Nov 26 16:50:58 2007
@@ -120,7 +120,6 @@
 			// else done
 		}
 
-		currentRow = result;
 		setCurrentRow(result);
 
 		nextTime += getElapsedMillis(beginTime);

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericAggregateResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericAggregateResultSet.java?rev=598483&r1=598482&r2=598483&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericAggregateResultSet.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericAggregateResultSet.java
Mon Nov 26 16:50:58 2007
@@ -164,7 +164,6 @@
 		}
 
 		setCurrentRow(row);
-		currentRow = row;
 
 		boolean eliminatedNulls = false;
 		for (int i = 0; i < size; i++)

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/HashScanResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/HashScanResultSet.java?rev=598483&r1=598482&r2=598483&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/HashScanResultSet.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/HashScanResultSet.java
Mon Nov 26 16:50:58 2007
@@ -497,7 +497,6 @@
 
 		}
 
-		currentRow = result;
 		setCurrentRow(result);
 
 		nextTime += getElapsedMillis(beginTime);

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/HashTableResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/HashTableResultSet.java?rev=598483&r1=598482&r2=598483&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/HashTableResultSet.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/HashTableResultSet.java
Mon Nov 26 16:50:58 2007
@@ -445,7 +445,6 @@
 			while (result == null && numFetchedOnNext < entryVectorSize);
 		}
 
-		currentRow = result;
 		setCurrentRow(result);
 
 		nextTime += getElapsedMillis(beginTime);

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/LastIndexKeyResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/LastIndexKeyResultSet.java?rev=598483&r1=598482&r2=598483&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/LastIndexKeyResultSet.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/LastIndexKeyResultSet.java
Mon Nov 26 16:50:58 2007
@@ -200,9 +200,7 @@
 					accessedCols,
 					candidateCopy.getRowArray()))
 		{
-			currentRow =
-			  getCompactRow(candidateCopy, accessedCols, true);
-			setCurrentRow(currentRow);
+			setCurrentRow(getCompactRow(candidateCopy, accessedCols, true));
 		}
 		else
 		{

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/MaterializedResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/MaterializedResultSet.java?rev=598483&r1=598482&r2=598483&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/MaterializedResultSet.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/MaterializedResultSet.java
Mon Nov 26 16:50:58 2007
@@ -197,8 +197,7 @@
 			rowsSeen++;
 		}
 
-		currentRow = result;
-		setCurrentRow(currentRow);
+		setCurrentRow(result);
 
 		nextTime += getElapsedMillis(beginTime);
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/NormalizeResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/NormalizeResultSet.java?rev=598483&r1=598482&r2=598483&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/NormalizeResultSet.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/NormalizeResultSet.java
Mon Nov 26 16:50:58 2007
@@ -190,7 +190,6 @@
 			rowsSeen++;
 		}
 
-		currentRow = result;
 		setCurrentRow(result);
 
 		nextTime += getElapsedMillis(beginTime);

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/OnceResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/OnceResultSet.java?rev=598483&r1=598482&r2=598483&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/OnceResultSet.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/OnceResultSet.java Mon
Nov 26 16:50:58 2007
@@ -239,7 +239,6 @@
 			}
 	    }
 
-		currentRow = result;
 		setCurrentRow(result);
 		rowsSeen++;
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ScalarAggregateResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ScalarAggregateResultSet.java?rev=598483&r1=598482&r2=598483&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ScalarAggregateResultSet.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ScalarAggregateResultSet.java
Mon Nov 26 16:50:58 2007
@@ -227,7 +227,6 @@
 			if (countOfRows == 0)
 			{
 				aggResult = finishAggregation(aggResult);
-				currentRow = aggResult;
 				setCurrentRow(aggResult);
 				countOfRows++;
 			}

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ScrollInsensitiveResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ScrollInsensitiveResultSet.java?rev=598483&r1=598482&r2=598483&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ScrollInsensitiveResultSet.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ScrollInsensitiveResultSet.java
Mon Nov 26 16:50:58 2007
@@ -536,8 +536,7 @@
 			afterLast = false;
 		}
 
-		currentRow = result;
-		setCurrentRow(currentRow);
+		setCurrentRow(result);
 		beforeFirst = false;
 
 		nextTime += getElapsedMillis(beginTime);

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/SetOpResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/SetOpResultSet.java?rev=598483&r1=598482&r2=598483&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/SetOpResultSet.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/SetOpResultSet.java
Mon Nov 26 16:50:58 2007
@@ -186,8 +186,8 @@
                 }
             }
         }
-        currentRow = leftInputRow;
-        setCurrentRow( currentRow );
+
+        setCurrentRow(leftInputRow);
 
         if (currentRow != null) {
            rowsReturned++;

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/UnionResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/UnionResultSet.java?rev=598483&r1=598482&r2=598483&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/UnionResultSet.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/UnionResultSet.java
Mon Nov 26 16:50:58 2007
@@ -148,7 +148,6 @@
 	        }
 	    }
 
-		currentRow = result;
 		setCurrentRow(result);
 		if (result != null)
 		{
@@ -294,8 +293,6 @@
 	            break;
         }
 
-
-		currentRow = result;
 		setCurrentRow(result);
 	    return result;
 	}



Mime
View raw message