db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r567094 - in /db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute: DistinctScalarAggregateResultSet.java GenericAggregator.java ScalarAggregateResultSet.java SortResultSet.java
Date Fri, 17 Aug 2007 17:37:49 GMT
Author: djd
Date: Fri Aug 17 10:37:48 2007
New Revision: 567094

URL: http://svn.apache.org/viewvc?view=rev&rev=567094
Log:
Minor cleanup -remove some unused variables and cleanup imports for some aggregator classes

Modified:
    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/GenericAggregator.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/SortResultSet.java

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?view=diff&rev=567094&r1=567093&r2=567094
==============================================================================
--- 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
Fri Aug 17 10:37:48 2007
@@ -164,8 +164,6 @@
 	 */
 	public ExecRow	getNextRowCore() throws StandardException 
 	{
-	    ExecIndexRow sortResult = null;
-	    ExecRow result = null;
 	    ExecIndexRow execIndexRow = null;
 	    ExecIndexRow aggResult = null;
 		boolean	cloneArg = true;

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericAggregator.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericAggregator.java?view=diff&rev=567094&r1=567093&r2=567094
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericAggregator.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericAggregator.java
Fri Aug 17 10:37:48 2007
@@ -21,43 +21,25 @@
 
 package org.apache.derby.impl.sql.execute;
 
-import org.apache.derby.iapi.types.NumberDataValue;
-import org.apache.derby.iapi.types.UserDataValue;
-
-import org.apache.derby.iapi.reference.SQLState;
-
-import org.apache.derby.iapi.sql.execute.ExecRow;
-import org.apache.derby.iapi.store.access.TransactionController;
+import org.apache.derby.iapi.error.StandardException;
 import org.apache.derby.iapi.services.io.Storable;
-
-import org.apache.derby.iapi.types.DataValueDescriptor;
-import org.apache.derby.iapi.types.DataValueDescriptor;
-import org.apache.derby.iapi.sql.ResultDescription;
-
-import org.apache.derby.iapi.services.sanity.SanityManager;
 import org.apache.derby.iapi.services.loader.ClassFactory;
-
+import org.apache.derby.iapi.services.sanity.SanityManager;
 import org.apache.derby.iapi.sql.execute.ExecAggregator;
-import org.apache.derby.iapi.sql.execute.NoPutResultSet;
-import org.apache.derby.iapi.sql.conn.LanguageConnectionContext;
-
-import org.apache.derby.iapi.error.StandardException;
-import org.apache.derby.iapi.jdbc.ConnectionContext;
-import java.sql.Statement;
+import org.apache.derby.iapi.sql.execute.ExecRow;
+import org.apache.derby.iapi.types.DataValueDescriptor;
+import org.apache.derby.iapi.types.UserDataValue;
 /**
  * Adaptor that sits between execution layer and aggregates.
  *
  */
 class GenericAggregator 
 {
-	AggregatorInfo			aggInfo;
+	private final AggregatorInfo			aggInfo;
 	int						aggregatorColumnId;
 	private int						inputColumnId;
 	private int						resultColumnId;
-	private ResultDescription		inputColumnResultDescription;
 
-	private	ExecRow[]			rowArray;
-	private	TemporaryRowHolderResultSet execResultSet;
 	private final ClassFactory		cf;
 
 	/*
@@ -82,8 +64,6 @@
 		aggregatorColumnId = aggInfo.getAggregatorColNum();
 		inputColumnId = aggInfo.getInputColNum();
 		resultColumnId = aggInfo.getOutputColNum();
-		int[] colArray = new int[1];
-		inputColumnResultDescription = aggInfo.getResultDescription();
 		this.cf = cf;
 	}
 

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?view=diff&rev=567094&r1=567093&r2=567094
==============================================================================
--- 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
Fri Aug 17 10:37:48 2007
@@ -21,40 +21,16 @@
 
 package org.apache.derby.impl.sql.execute;
 
-import org.apache.derby.iapi.services.monitor.Monitor;
-
+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.services.stream.HeaderPrintWriter;
-import org.apache.derby.iapi.services.stream.InfoStreams;
-
-import org.apache.derby.iapi.services.io.Formatable;
-
+import org.apache.derby.iapi.sql.Activation;
 import org.apache.derby.iapi.sql.execute.CursorResultSet;
-import org.apache.derby.iapi.sql.ResultSet;
-import org.apache.derby.iapi.sql.execute.ExecRow;
 import org.apache.derby.iapi.sql.execute.ExecIndexRow;
+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.store.access.ColumnOrdering;
-import org.apache.derby.iapi.store.access.TransactionController;
-
-import org.apache.derby.iapi.services.loader.GeneratedMethod;
-
-import org.apache.derby.iapi.sql.conn.LanguageConnectionContext;
-
-import org.apache.derby.iapi.error.StandardException;
-
 import org.apache.derby.iapi.types.RowLocation;
 
-import org.apache.derby.iapi.services.io.FormatableArrayHolder;
-
-import java.util.Properties;
-import java.util.Vector;
-import java.util.Enumeration;
-
 /**
  * This ResultSet evaluates scalar, non distinct aggregates.
  * It will scan the entire source result set and calculate
@@ -186,13 +162,11 @@
 			return null;
 		}
 
-	    ExecIndexRow sortResult = null;
-	    ExecRow result = null;
 	    ExecIndexRow execIndexRow = null;
 	    ExecIndexRow aggResult = null;
 		//only care if it is a minAgg if we have a singleInputRow, then we know
 		//we are only looking at one aggregate
-		boolean minAgg = (singleInputRow && aggregates[0].aggInfo.aggregateName.equals("MIN"));
+		boolean minAgg = (singleInputRow && aggregates[0].getAggregatorInfo().aggregateName.equals("MIN"));
 		beginTime = getCurrentTimeMillis();
 	    if (isOpen)
 	    {

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/SortResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/SortResultSet.java?view=diff&rev=567094&r1=567093&r2=567094
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/SortResultSet.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/SortResultSet.java Fri
Aug 17 10:37:48 2007
@@ -570,15 +570,13 @@
 		throws StandardException
 	{
 		ExecRow				sourceRow;
-		ExecRow			inputRow = null;	
 
 		if ((sourceRow = source.getNextRowCore()) != null)
 		{
 			rowsInput++;
-			inputRow = sourceRow;
 		}
 
-		return inputRow;
+		return sourceRow;
 	}
 
 



Mime
View raw message