db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r1412763 - in /db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute: DependentResultSet.java HashScanResultSet.java LastIndexKeyResultSet.java SetOpResultSet.java UnionResultSet.java VTIResultSet.java
Date Fri, 23 Nov 2012 07:11:30 GMT
Author: kahatlen
Date: Fri Nov 23 07:11:28 2012
New Revision: 1412763

URL: http://svn.apache.org/viewvc?rev=1412763&view=rev
Log:
DERBY-6003: Create row templates outside of the generated code

Initial cleanup: Remove unused fields in ResultSet classes.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DependentResultSet.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/LastIndexKeyResultSet.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
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/VTIResultSet.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DependentResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DependentResultSet.java?rev=1412763&r1=1412762&r2=1412763&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DependentResultSet.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DependentResultSet.java
Fri Nov 23 07:11:28 2012
@@ -91,10 +91,7 @@ class DependentResultSet extends ScanRes
 	protected long conglomId;
     protected DynamicCompiledOpenConglomInfo heapDcoci;
     protected StaticCompiledOpenConglomInfo heapScoci;
-	protected GeneratedMethod resultRowAllocator;
-	protected GeneratedMethod startKeyGetter;
 	protected int startSearchOperator;
-	protected GeneratedMethod stopKeyGetter;
 	protected int stopSearchOperator;
 	protected Qualifier[][] qualifiers;
 	public String tableName;
@@ -103,7 +100,6 @@ class DependentResultSet extends ScanRes
 	protected boolean runTimeStatisticsOn;
 	public int rowsPerRead;
 	public boolean forUpdate;
-	private boolean sameStartStopPosition;
 
 	// Run time statistics
 	private Properties scanProperties;
@@ -169,20 +165,15 @@ class DependentResultSet extends ScanRes
 		if (SanityManager.DEBUG) {
 			SanityManager.ASSERT( activation!=null, "table scan must get activation context");
 			SanityManager.ASSERT( resultRowAllocator!= null, "table scan must get row allocator");
-			if (sameStartStopPosition)
-			{
-				SanityManager.ASSERT(stopKeyGetter == null,
-					"stopKeyGetter expected to be null when sameStartStopPosition is true");
-			}
-		}
 
-        this.resultRowAllocator = resultRowAllocator;
+            // This ResultSet doesn't use start or stop keys, so expect them
+            // to be null.
+            SanityManager.ASSERT(startKeyGetter == null, "start key not null");
+            SanityManager.ASSERT(stopKeyGetter == null, "stop key not null");
+		}
 
-		this.startKeyGetter = startKeyGetter;
 		this.startSearchOperator = startSearchOperator;
-		this.stopKeyGetter = stopKeyGetter;
 		this.stopSearchOperator = stopSearchOperator;
-		this.sameStartStopPosition = sameStartStopPosition;
 		this.qualifiers = qualifiers;
 		this.tableName = tableName;
 		this.userSuppliedOptimizerOverrides = userSuppliedOptimizerOverrides;

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=1412763&r1=1412762&r2=1412763&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
Fri Nov 23 07:11:28 2012
@@ -28,9 +28,7 @@ import org.apache.derby.iapi.error.Stand
 import org.apache.derby.iapi.reference.SQLState;
 import org.apache.derby.iapi.services.i18n.MessageService;
 import org.apache.derby.iapi.services.io.FormatableArrayHolder;
-import org.apache.derby.iapi.services.io.FormatableBitSet;
 import org.apache.derby.iapi.services.io.FormatableIntHolder;
-import org.apache.derby.iapi.services.io.Storable;
 import org.apache.derby.iapi.services.loader.GeneratedMethod;
 import org.apache.derby.iapi.services.sanity.SanityManager;
 import org.apache.derby.iapi.sql.Activation;
@@ -75,7 +73,6 @@ public class HashScanResultSet extends S
     // life of object.
     private long conglomId;
     protected StaticCompiledOpenConglomInfo scoci;
-	private GeneratedMethod resultRowAllocator;
 	private GeneratedMethod startKeyGetter;
 	private int startSearchOperator;
 	private GeneratedMethod stopKeyGetter;
@@ -160,8 +157,6 @@ public class HashScanResultSet extends S
 			}
 		}
 
-        this.resultRowAllocator = resultRowAllocator;
-
 		this.startKeyGetter = startKeyGetter;
 		this.startSearchOperator = startSearchOperator;
 		this.stopKeyGetter = stopKeyGetter;

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=1412763&r1=1412762&r2=1412763&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
Fri Nov 23 07:11:28 2012
@@ -25,7 +25,6 @@ import org.apache.derby.iapi.error.Stand
 import org.apache.derby.iapi.services.loader.GeneratedMethod;
 import org.apache.derby.iapi.services.sanity.SanityManager;
 import org.apache.derby.iapi.sql.Activation;
-import org.apache.derby.iapi.sql.execute.CursorResultSet;
 import org.apache.derby.iapi.sql.execute.ExecRow;
 import org.apache.derby.iapi.sql.execute.NoPutResultSet;
 import org.apache.derby.iapi.store.access.Qualifier;
@@ -41,10 +40,7 @@ class LastIndexKeyResultSet extends Scan
 	// set in constructor and not altered during
 	// life of object.
 	protected long conglomId;
-	protected GeneratedMethod resultRowAllocator;
-	protected GeneratedMethod startKeyGetter;
 	protected int startSearchOperator;
-	protected GeneratedMethod stopKeyGetter;
 	protected int stopSearchOperator;
 	protected Qualifier[][] qualifiers;
 	public String tableName;
@@ -120,7 +116,6 @@ class LastIndexKeyResultSet extends Scan
 			SanityManager.ASSERT( resultRowAllocator!= null, "this scan must get row allocator");
 		}
 
-		this.resultRowAllocator = resultRowAllocator;
 		this.tableName = tableName;
 		this.userSuppliedOptimizerOverrides = userSuppliedOptimizerOverrides;
 		this.indexName = indexName;

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=1412763&r1=1412762&r2=1412763&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
Fri Nov 23 07:11:28 2012
@@ -23,11 +23,9 @@ package org.apache.derby.impl.sql.execut
 
 import org.apache.derby.iapi.error.StandardException;
 
-import org.apache.derby.iapi.services.loader.GeneratedMethod;
 import org.apache.derby.iapi.services.sanity.SanityManager;
 
 import org.apache.derby.iapi.sql.Activation;
-import org.apache.derby.iapi.sql.ResultDescription;
 
 import org.apache.derby.iapi.sql.execute.CursorResultSet;
 import org.apache.derby.iapi.sql.execute.ExecPreparedStatement;
@@ -57,7 +55,6 @@ class SetOpResultSet extends NoPutResult
     private DataValueDescriptor[] prevCols; /* Used to remove duplicates in the EXCEPT DISTINCT
case.
                                              * It is equal to the previously output columns.
                                              */
-    private int rightDuplicateCount; // Number of duplicates of the current row from the
right input
     private ExecRow leftInputRow;
     private ExecRow rightInputRow;
 

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=1412763&r1=1412762&r2=1412763&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
Fri Nov 23 07:11:28 2012
@@ -21,13 +21,9 @@
 
 package org.apache.derby.impl.sql.execute;
 
-import org.apache.derby.iapi.services.monitor.Monitor;
 
 import org.apache.derby.iapi.services.sanity.SanityManager;
 
-import org.apache.derby.iapi.services.stream.HeaderPrintWriter;
-import org.apache.derby.iapi.services.stream.InfoStreams;
-
 import org.apache.derby.iapi.sql.execute.CursorResultSet;
 import org.apache.derby.iapi.sql.execute.ExecRow;
 import org.apache.derby.iapi.sql.execute.NoPutResultSet;
@@ -35,11 +31,8 @@ import org.apache.derby.iapi.sql.execute
 import org.apache.derby.iapi.error.StandardException;
 
 import org.apache.derby.iapi.sql.Activation;
-import org.apache.derby.iapi.sql.ResultSet;
 import org.apache.derby.iapi.sql.ResultDescription;
 
-import org.apache.derby.iapi.services.loader.GeneratedMethod;
-
 import org.apache.derby.iapi.types.RowLocation;
 
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/VTIResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/VTIResultSet.java?rev=1412763&r1=1412762&r2=1412763&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/VTIResultSet.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/VTIResultSet.java Fri
Nov 23 07:11:28 2012
@@ -22,22 +22,14 @@
 package org.apache.derby.impl.sql.execute;
 
 import org.apache.derby.catalog.TypeDescriptor;
-import org.apache.derby.iapi.services.loader.ClassFactory;
-import org.apache.derby.iapi.services.loader.ClassInspector;
-
-import org.apache.derby.iapi.services.monitor.Monitor;
 
 import org.apache.derby.iapi.services.sanity.SanityManager;
 
-import org.apache.derby.iapi.services.stream.HeaderPrintWriter;
-import org.apache.derby.iapi.services.stream.InfoStreams;
-
 import org.apache.derby.iapi.sql.execute.CursorResultSet;
 import org.apache.derby.iapi.sql.execute.ExecRow;
 import org.apache.derby.iapi.sql.execute.NoPutResultSet;
 
 import org.apache.derby.iapi.sql.Activation;
-import org.apache.derby.iapi.sql.ResultDescription;
 import org.apache.derby.iapi.sql.ParameterValueSet; 
 import org.apache.derby.iapi.types.TypeId;
 import org.apache.derby.iapi.types.DataTypeDescriptor;
@@ -78,8 +70,6 @@ class VTIResultSet extends NoPutResultSe
 	public int rowsReturned;
 	public String javaClassName;
 
-    private boolean next;
-	private ClassInspector classInspector;
     private GeneratedMethod row;
     private GeneratedMethod constructor;
 	private PreparedStatement userPS;
@@ -470,7 +460,6 @@ class VTIResultSet extends NoPutResultSe
 			// REVISIT: does this need to be in a finally
 			// block, to ensure that it is executed?
 	    	clearCurrentRow();
-	    	next = false;
 
 			/* close the user ResultSet.  We have to eat any exception here
 			 * since our close() method cannot throw an exception.



Mime
View raw message