db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r1484566 - in /db/derby/code/trunk/java/engine/org/apache/derby/impl/sql: ./ compile/ execute/ execute/rts/ execute/xplain/
Date Mon, 20 May 2013 19:05:52 GMT
Author: rhillegas
Date: Mon May 20 19:05:51 2013
New Revision: 1484566

URL: http://svn.apache.org/r1484566
Log:
DERBY-6213: Generify impl/sql/compile and impl/sql/execute.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/build.xml
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateIndexNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateTriggerNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DMLModStatementNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DeleteNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/GrantNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/HashJoinStrategy.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/RevokeNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/UserDefinedAggregator.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealAnyResultSetStatistics.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealBasicNoPutResultSetStatistics.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealDistinctScalarAggregateStatistics.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealGroupedAggregateStatistics.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealIndexRowToBaseRowStatistics.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealMaterializedResultSetStatistics.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealNestedLoopJoinStatistics.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealNoRowsResultSetStatistics.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealNormalizeResultSetStatistics.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealOnceResultSetStatistics.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealProjectRestrictStatistics.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealRowCountStatistics.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealScalarAggregateStatistics.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealScrollInsensitiveResultSetStatistics.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealSetOpResultSetStatistics.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealSortStatistics.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealUnionResultSetStatistics.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealWindowResultSetStatistics.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RunTimeStatisticsImpl.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/xplain/XPLAINSystemTableVisitor.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/build.xml?rev=1484566&r1=1484565&r2=1484566&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/build.xml (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/build.xml Mon May 20 19:05:51
2013
@@ -35,7 +35,7 @@
   <property name="cur.dir" value="impl/sql"/>
 
 <!-- Targets -->
-  <target name="parser">
+  <target name="parser" depends="chkparser" >
     <ant antfile="${src.dir}/build.xml" target="genParser">
       <property name="msg" value="Generating SQL parser..."/>
       <property name="srcroot" value="engine"/>
@@ -84,6 +84,12 @@
       </fileset>
     </replaceregexp>
 
+    <antcall target="postProcessParser"/>
+
+  </target>
+
+  <target name="postProcessParser" unless="parser.compiled">
+
     <!-- Generify some types so they will compile cleanly on Java 6. -->
     <replaceregexp match="java.util.Vector" replace="java.util.Vector&lt;Object&gt;"
flags="m">
       <fileset dir="${generated.src.dir}/${derby.dir}/impl/sql/compile">
@@ -103,29 +109,14 @@
 
   </target>
 
-  <target name="compile" depends="parser">
+  <target name="chkparser">
+    <uptodate property="parser.compiled"
+              targetfile="${generated.src.dir}/${derby.dir}/impl/sql/compile/SQLParser.java"
>
+      <srcfiles dir="compile"  includes="sqlgrammar.jj" />
+    </uptodate>
+  </target>
 
-    <javac
-      source="1.6"
-      target="1.6"
-      bootclasspath="${empty}"
-      nowarn="on"
-      debug="${debug}"
-      depend="${depend}"
-      deprecation="${deprecation}"
-      optimize="${optimize}"
-      proceed="${proceed}"
-      verbose="${verbose}"
-      srcdir="${derby.engine.src.dir}:${generated.src.dir}"
-      destdir="${out.dir}">
-      <classpath>
-        <pathelement path="${java16compile.classpath}"/>
-      </classpath>
-      <include name="${derby.dir}/${cur.dir}/catalog/**"/>
-      <include name="${derby.dir}/${cur.dir}/depend/**"/>
-      <include name="${derby.dir}/${cur.dir}/conn/**"/>
-      <compilerarg value="-Xlint:unchecked"/>
-    </javac>
+  <target name="compile" depends="parser">
 
     <javac
       source="1.6"
@@ -144,10 +135,7 @@
         <pathelement path="${java16compile.classpath}"/>
       </classpath>
       <include name="${derby.dir}/${cur.dir}/**"/>
-      <exclude name="${derby.dir}/${cur.dir}/catalog/**"/>
-      <exclude name="${derby.dir}/${cur.dir}/depend/**"/>
-      <exclude name="${derby.dir}/${cur.dir}/conn/**"/>
-      <!-- <compilerarg value="-Xlint:unchecked"/> -->
+      <compilerarg value="-Xlint:unchecked"/>
     </javac>
 
     <copy file="${derby.engine.src.dir}/${derby.dir}/${cur.dir}/catalog/metadata_net.properties"
tofile="${out.dir}/org/apache/derby/impl/sql/catalog/metadata_net.properties"/>

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateIndexNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateIndexNode.java?rev=1484566&r1=1484565&r2=1484566&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateIndexNode.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateIndexNode.java
Mon May 20 19:05:51 2013
@@ -294,7 +294,7 @@ public class CreateIndexNode extends DDL
 				throws StandardException
 	{
 		int size = columnNameList.size();
-        HashSet seenNames = new HashSet(size + 2, 0.999f);
+        HashSet<String> seenNames = new HashSet<String>(size + 2, 0.999f);
 		columnNames = new String[size];
 		isAscending = new boolean[size];
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateTriggerNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateTriggerNode.java?rev=1484566&r1=1484565&r2=1484566&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateTriggerNode.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateTriggerNode.java
Mon May 20 19:05:51 2013
@@ -411,7 +411,7 @@ public class CreateTriggerNode extends D
 		*/
 		if (triggerCols != null && triggerCols.size() != 0)
 		{
-            HashSet columnNames = new HashSet();
+            HashSet<String> columnNames = new HashSet<String>();
 			int tcSize = triggerCols.size();
 			for (int i = 0; i < tcSize; i++)
 			{
@@ -458,13 +458,13 @@ public class CreateTriggerNode extends D
      * Comparator that can be used for sorting lists of FromBaseTables
      * on the position they have in the SQL query string.
      */
-    private static final Comparator OFFSET_COMPARATOR = new Comparator() {
-        public int compare(Object o1, Object o2) {
+    private static final Comparator<FromBaseTable> OFFSET_COMPARATOR = new Comparator<FromBaseTable>()
{
+        public int compare(FromBaseTable o1, FromBaseTable o2) {
             // Return negative int, zero, or positive int if the offset of the
             // first table is less than, equal to, or greater than the offset
             // of the second table.
-            return ((FromBaseTable) o1).getTableNameField().getBeginOffset() -
-                    ((FromBaseTable) o2).getTableNameField().getBeginOffset();
+            return o1.getTableNameField().getBeginOffset() -
+                    o2.getTableNameField().getBeginOffset();
         }
     };
 
@@ -599,13 +599,13 @@ public class CreateTriggerNode extends D
 			** the from table is NEW or OLD (or user designated alternates
 			** REFERENCING), we turn them into a trigger table VTI.
 			*/
-			CollectNodesVisitor visitor = new CollectNodesVisitor(FromBaseTable.class);
+			CollectNodesVisitor<FromBaseTable> visitor = new CollectNodesVisitor<FromBaseTable>(FromBaseTable.class);
 			actionNode.accept(visitor);
-			List tabs = visitor.getList();
+			List<FromBaseTable> tabs = visitor.getList();
 			Collections.sort(tabs, OFFSET_COMPARATOR);
 			for (int i = 0; i < tabs.size(); i++)
 			{
-				FromBaseTable fromTable = (FromBaseTable) tabs.get(i);
+				FromBaseTable fromTable = tabs.get(i);
 				String refTableName = fromTable.getTableName().getTableName();
 				String baseTableName = fromTable.getBaseTableName();
 				if ((baseTableName == null) ||

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DMLModStatementNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DMLModStatementNode.java?rev=1484566&r1=1484565&r2=1484566&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DMLModStatementNode.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DMLModStatementNode.java
Mon May 20 19:05:51 2013
@@ -107,7 +107,7 @@ abstract class DMLModStatementNode exten
 	protected TableName synonymTableName;
 
     /** Set of dependent tables for cascading deletes. */
-    Set dependentTables;
+    Set<String> dependentTables;
 
 	/**
 	 * Initializer for a DMLModStatementNode -- delegate to DMLStatementNode

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DeleteNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DeleteNode.java?rev=1484566&r1=1484565&r2=1484566&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DeleteNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DeleteNode.java Mon
May 20 19:05:51 2013
@@ -337,7 +337,7 @@ public class DeleteNode extends DMLModSt
 
 				if(!isDependentTable){
 					//graph node
-                    dependentTables = new HashSet();
+                    dependentTables = new HashSet<String>();
 				}
 
 				/*Check whether the current target has already been explored.

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/GrantNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/GrantNode.java?rev=1484566&r1=1484565&r2=1484566&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/GrantNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/GrantNode.java Mon May
20 19:05:51 2013
@@ -21,6 +21,7 @@
 
 package	org.apache.derby.impl.sql.compile;
 
+import org.apache.derby.iapi.sql.depend.Provider;
 import org.apache.derby.iapi.sql.execute.ConstantAction;
 import org.apache.derby.impl.sql.execute.PrivilegeInfo;
 import org.apache.derby.iapi.services.sanity.SanityManager;
@@ -93,7 +94,7 @@ public class GrantNode extends DDLStatem
 	 */
 	public void bindStatement() throws StandardException
 	{
-		privileges = (PrivilegeNode) privileges.bind( new HashMap(), grantees, true);
+		privileges = (PrivilegeNode) privileges.bind( new HashMap<Provider,Provider>(), grantees,
true);
 	} // end of bind
 
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/HashJoinStrategy.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/HashJoinStrategy.java?rev=1484566&r1=1484565&r2=1484566&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/HashJoinStrategy.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/HashJoinStrategy.java
Mon May 20 19:05:51 2013
@@ -643,7 +643,7 @@ public class HashJoinStrategy extends Ba
 		}
 
         // Build a list of all the hash key columns
-        ArrayList hashKeys = new ArrayList();
+        ArrayList<Integer> hashKeys = new ArrayList<Integer>();
         for (int colCtr = 0; colCtr < columns.length; colCtr++)
 		{
 			// Is there an equijoin condition on this column?

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/RevokeNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/RevokeNode.java?rev=1484566&r1=1484565&r2=1484566&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/RevokeNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/RevokeNode.java Mon
May 20 19:05:51 2013
@@ -21,6 +21,7 @@
 
 package	org.apache.derby.impl.sql.compile;
 
+import org.apache.derby.iapi.sql.depend.Provider;
 import org.apache.derby.iapi.sql.execute.ConstantAction;
 import org.apache.derby.impl.sql.execute.PrivilegeInfo;
 import org.apache.derby.iapi.services.sanity.SanityManager;
@@ -93,7 +94,7 @@ public class RevokeNode extends DDLState
      */
 	public void bindStatement() throws StandardException
 	{
-        privileges = (PrivilegeNode) privileges.bind( new HashMap(), grantees, false);
+        privileges = (PrivilegeNode) privileges.bind( new HashMap<Provider,Provider>(),
grantees, false);
     } // end of bind
 
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/UserDefinedAggregator.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/UserDefinedAggregator.java?rev=1484566&r1=1484565&r2=1484566&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/UserDefinedAggregator.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/UserDefinedAggregator.java
Mon May 20 19:05:51 2013
@@ -106,6 +106,7 @@ public final class UserDefinedAggregator
 
 	public boolean didEliminateNulls() { return _eliminatedNulls; }
 
+    @SuppressWarnings("unchecked")
 	public void accumulate( DataValueDescriptor addend, Object ga ) 
 		throws StandardException
 	{
@@ -120,6 +121,7 @@ public final class UserDefinedAggregator
         _aggregator.accumulate( value );
 	}
 
+    @SuppressWarnings("unchecked")
 	public void merge(ExecAggregator addend)
 		throws StandardException
 	{

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealAnyResultSetStatistics.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealAnyResultSetStatistics.java?rev=1484566&r1=1484565&r2=1484566&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealAnyResultSetStatistics.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealAnyResultSetStatistics.java
Mon May 20 19:05:51 2013
@@ -153,8 +153,8 @@ public class RealAnyResultSetStatistics 
 	{
 		return getStatementExecutionPlanText(0);
 	}
-  public java.util.Vector getChildren(){
-    java.util.Vector children = new java.util.Vector();
+  public java.util.Vector<ResultSetStatistics> getChildren(){
+    java.util.Vector<ResultSetStatistics> children = new java.util.Vector<ResultSetStatistics>();
     children.addElement(childResultSetStatistics);
     return children;
   }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealBasicNoPutResultSetStatistics.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealBasicNoPutResultSetStatistics.java?rev=1484566&r1=1484565&r2=1484566&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealBasicNoPutResultSetStatistics.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealBasicNoPutResultSetStatistics.java
Mon May 20 19:05:51 2013
@@ -144,8 +144,8 @@ abstract class RealBasicNoPutResultSetSt
    *
 	 * @return java.util.Vector	A vector of objects.
 	 */
-  public Vector getChildren(){
-    return new Vector();
+  public Vector<ResultSetStatistics> getChildren(){
+    return new Vector<ResultSetStatistics>();
   }
 	/**
    * Return the time for all operations performed by this node, and the children

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealDistinctScalarAggregateStatistics.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealDistinctScalarAggregateStatistics.java?rev=1484566&r1=1484565&r2=1484566&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealDistinctScalarAggregateStatistics.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealDistinctScalarAggregateStatistics.java
Mon May 20 19:05:51 2013
@@ -124,8 +124,8 @@ public class RealDistinctScalarAggregate
 	{
 		return getStatementExecutionPlanText(0);
 	}
-  public java.util.Vector getChildren(){
-    java.util.Vector children = new java.util.Vector();
+  public java.util.Vector<ResultSetStatistics> getChildren(){
+    java.util.Vector<ResultSetStatistics> children = new java.util.Vector<ResultSetStatistics>();
     children.addElement(childResultSetStatistics);
     return children;
   }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealGroupedAggregateStatistics.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealGroupedAggregateStatistics.java?rev=1484566&r1=1484565&r2=1484566&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealGroupedAggregateStatistics.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealGroupedAggregateStatistics.java
Mon May 20 19:05:51 2013
@@ -163,8 +163,8 @@ public class RealGroupedAggregateStatist
 	{
 		return getStatementExecutionPlanText(0);
 	}
-  public java.util.Vector getChildren(){
-    java.util.Vector children = new java.util.Vector();
+  public java.util.Vector<ResultSetStatistics> getChildren(){
+    java.util.Vector<ResultSetStatistics> children = new java.util.Vector<ResultSetStatistics>();
     children.addElement(childResultSetStatistics);
     return children;
   }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealIndexRowToBaseRowStatistics.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealIndexRowToBaseRowStatistics.java?rev=1484566&r1=1484565&r2=1484566&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealIndexRowToBaseRowStatistics.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealIndexRowToBaseRowStatistics.java
Mon May 20 19:05:51 2013
@@ -153,8 +153,8 @@ public class RealIndexRowToBaseRowStatis
 	{
 		return getStatementExecutionPlanText(0);
 	}
-  public java.util.Vector getChildren(){
-    java.util.Vector children = new java.util.Vector();
+  public java.util.Vector<ResultSetStatistics> getChildren(){
+    java.util.Vector<ResultSetStatistics> children = new java.util.Vector<ResultSetStatistics>();
     children.addElement(childResultSetStatistics);
     return children;
   }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealMaterializedResultSetStatistics.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealMaterializedResultSetStatistics.java?rev=1484566&r1=1484565&r2=1484566&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealMaterializedResultSetStatistics.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealMaterializedResultSetStatistics.java
Mon May 20 19:05:51 2013
@@ -148,8 +148,8 @@ public class RealMaterializedResultSetSt
 	{
 		return getStatementExecutionPlanText(0);
 	}
-  public java.util.Vector getChildren(){
-    java.util.Vector children = new java.util.Vector();
+  public java.util.Vector<ResultSetStatistics> getChildren(){
+    java.util.Vector<ResultSetStatistics> children = new java.util.Vector<ResultSetStatistics>();
     children.addElement(childResultSetStatistics);
     return children;
   }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealNestedLoopJoinStatistics.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealNestedLoopJoinStatistics.java?rev=1484566&r1=1484565&r2=1484566&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealNestedLoopJoinStatistics.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealNestedLoopJoinStatistics.java
Mon May 20 19:05:51 2013
@@ -183,9 +183,9 @@ public class RealNestedLoopJoinStatistic
 		return getStatementExecutionPlanText(0);
 	}
 
-	public java.util.Vector getChildren()
+	public java.util.Vector<ResultSetStatistics> getChildren()
 	{
-		java.util.Vector children = new java.util.Vector();
+		java.util.Vector<ResultSetStatistics> children = new java.util.Vector<ResultSetStatistics>();
 	    children.addElement(leftResultSetStatistics);
 		children.addElement(rightResultSetStatistics);
 	    return children;

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealNoRowsResultSetStatistics.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealNoRowsResultSetStatistics.java?rev=1484566&r1=1484565&r2=1484566&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealNoRowsResultSetStatistics.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealNoRowsResultSetStatistics.java
Mon May 20 19:05:51 2013
@@ -118,8 +118,8 @@ abstract class RealNoRowsResultSetStatis
    *
 	 * @return java.util.Vector	A vector of objects.
 	 */
-  public Vector getChildren(){
-    Vector children = new Vector();
+  public Vector<ResultSetStatistics> getChildren(){
+    Vector<ResultSetStatistics> children = new Vector<ResultSetStatistics>();
     children.addElement(sourceResultSetStatistics);
     return children;
   }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealNormalizeResultSetStatistics.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealNormalizeResultSetStatistics.java?rev=1484566&r1=1484565&r2=1484566&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealNormalizeResultSetStatistics.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealNormalizeResultSetStatistics.java
Mon May 20 19:05:51 2013
@@ -133,8 +133,8 @@ public class RealNormalizeResultSetStati
 	{
 		return getStatementExecutionPlanText(0);
 	}
-  public java.util.Vector getChildren(){
-    java.util.Vector children = new java.util.Vector();
+  public java.util.Vector<ResultSetStatistics> getChildren(){
+    java.util.Vector<ResultSetStatistics> children = new java.util.Vector<ResultSetStatistics>();
     children.addElement(childResultSetStatistics);
     return children;
   }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealOnceResultSetStatistics.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealOnceResultSetStatistics.java?rev=1484566&r1=1484565&r2=1484566&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealOnceResultSetStatistics.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealOnceResultSetStatistics.java
Mon May 20 19:05:51 2013
@@ -151,8 +151,8 @@ public class RealOnceResultSetStatistics
 	{
 		return getStatementExecutionPlanText(0);
 	}
-  public java.util.Vector getChildren(){
-    java.util.Vector children = new java.util.Vector();
+  public java.util.Vector<ResultSetStatistics> getChildren(){
+    java.util.Vector<ResultSetStatistics> children = new java.util.Vector<ResultSetStatistics>();
     children.addElement(childResultSetStatistics);
     return children;
   }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealProjectRestrictStatistics.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealProjectRestrictStatistics.java?rev=1484566&r1=1484565&r2=1484566&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealProjectRestrictStatistics.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealProjectRestrictStatistics.java
Mon May 20 19:05:51 2013
@@ -228,8 +228,8 @@ public class RealProjectRestrictStatisti
 	{
 		return getStatementExecutionPlanText(0);
 	}
-  public java.util.Vector getChildren(){
-    java.util.Vector children = new java.util.Vector();
+  public java.util.Vector<ResultSetStatistics> getChildren(){
+    java.util.Vector<ResultSetStatistics> children = new java.util.Vector<ResultSetStatistics>();
     children.addElement(childResultSetStatistics);
 
 	// get all of our subqueries

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealRowCountStatistics.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealRowCountStatistics.java?rev=1484566&r1=1484565&r2=1484566&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealRowCountStatistics.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealRowCountStatistics.java
Mon May 20 19:05:51 2013
@@ -129,8 +129,8 @@ public class RealRowCountStatistics
     /**
      * @see RealBasicNoPutResultSetStatistics#getChildren
      */
-    public Vector getChildren() {
-        Vector children = new Vector();
+    public Vector<ResultSetStatistics> getChildren() {
+        Vector<ResultSetStatistics> children = new Vector<ResultSetStatistics>();
         children.addElement(childResultSetStatistics);
 
         return children;

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealScalarAggregateStatistics.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealScalarAggregateStatistics.java?rev=1484566&r1=1484565&r2=1484566&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealScalarAggregateStatistics.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealScalarAggregateStatistics.java
Mon May 20 19:05:51 2013
@@ -145,8 +145,8 @@ public class RealScalarAggregateStatisti
 	{
 		return getStatementExecutionPlanText(0);
 	}
-  public java.util.Vector getChildren(){
-    java.util.Vector children = new java.util.Vector();
+  public java.util.Vector<ResultSetStatistics> getChildren(){
+    java.util.Vector<ResultSetStatistics> children = new java.util.Vector<ResultSetStatistics>();
     children.addElement(childResultSetStatistics);
     return children;
   }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealScrollInsensitiveResultSetStatistics.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealScrollInsensitiveResultSetStatistics.java?rev=1484566&r1=1484565&r2=1484566&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealScrollInsensitiveResultSetStatistics.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealScrollInsensitiveResultSetStatistics.java
Mon May 20 19:05:51 2013
@@ -145,8 +145,8 @@ public class RealScrollInsensitiveResult
 	{
 		return getStatementExecutionPlanText(0);
 	}
-  public java.util.Vector getChildren(){
-    java.util.Vector children = new java.util.Vector();
+  public java.util.Vector<ResultSetStatistics> getChildren(){
+    java.util.Vector<ResultSetStatistics> children = new java.util.Vector<ResultSetStatistics>();
     children.addElement(childResultSetStatistics);
     return children;
   }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealSetOpResultSetStatistics.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealSetOpResultSetStatistics.java?rev=1484566&r1=1484565&r2=1484566&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealSetOpResultSetStatistics.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealSetOpResultSetStatistics.java
Mon May 20 19:05:51 2013
@@ -192,8 +192,8 @@ public class RealSetOpResultSetStatistic
      *         Vector</code>. 
      *         
      */
-    public java.util.Vector getChildren() {
-        java.util.Vector children = new java.util.Vector();
+    public java.util.Vector<ResultSetStatistics> getChildren() {
+        java.util.Vector<ResultSetStatistics> children = new java.util.Vector<ResultSetStatistics>();
         children.addElement(leftResultSetStatistics);
         children.addElement(rightResultSetStatistics);
         return children;

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealSortStatistics.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealSortStatistics.java?rev=1484566&r1=1484565&r2=1484566&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealSortStatistics.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealSortStatistics.java
Mon May 20 19:05:51 2013
@@ -176,8 +176,8 @@ public class RealSortStatistics 
 	{
 		return getStatementExecutionPlanText(0);
 	}
-  public java.util.Vector getChildren(){
-    java.util.Vector children = new java.util.Vector();
+  public java.util.Vector<ResultSetStatistics> getChildren(){
+    java.util.Vector<ResultSetStatistics> children = new java.util.Vector<ResultSetStatistics>();
     children.addElement(childResultSetStatistics);
     return children;
   }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealUnionResultSetStatistics.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealUnionResultSetStatistics.java?rev=1484566&r1=1484565&r2=1484566&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealUnionResultSetStatistics.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealUnionResultSetStatistics.java
Mon May 20 19:05:51 2013
@@ -160,8 +160,8 @@ public class RealUnionResultSetStatistic
 	{
 		return getStatementExecutionPlanText(0);
 	}
-  public java.util.Vector getChildren(){
-    java.util.Vector children = new java.util.Vector();
+  public java.util.Vector<ResultSetStatistics> getChildren(){
+    java.util.Vector<ResultSetStatistics> children = new java.util.Vector<ResultSetStatistics>();
     children.addElement(leftResultSetStatistics);
     children.addElement(rightResultSetStatistics);
     return children;

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealWindowResultSetStatistics.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealWindowResultSetStatistics.java?rev=1484566&r1=1484565&r2=1484566&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealWindowResultSetStatistics.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealWindowResultSetStatistics.java
Mon May 20 19:05:51 2013
@@ -129,9 +129,9 @@ public class RealWindowResultSetStatisti
      * RealBasicNoPutResultSetStatistics override.
      * @see RealBasicNoPutResultSetStatistics#getChildren
      */
-    public java.util.Vector getChildren()
+    public java.util.Vector<ResultSetStatistics> getChildren()
     {
-        java.util.Vector children = new java.util.Vector();
+        java.util.Vector<ResultSetStatistics> children = new java.util.Vector<ResultSetStatistics>();
         children.addElement(childResultSetStatistics);
         return children;
     }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RunTimeStatisticsImpl.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RunTimeStatisticsImpl.java?rev=1484566&r1=1484565&r2=1484566&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RunTimeStatisticsImpl.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RunTimeStatisticsImpl.java
Mon May 20 19:05:51 2013
@@ -379,8 +379,8 @@ public final class RunTimeStatisticsImpl
    *
 	 * @return java.util.Vector	A vector of objects.
 	 */
-  public Vector getChildren(){
-    Vector children = new Vector();
+  public Vector<ResultSetStatistics> getChildren(){
+    Vector<ResultSetStatistics> children = new Vector<ResultSetStatistics>();
     children.addElement(topResultSetStatistics);
     return children;
   }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/xplain/XPLAINSystemTableVisitor.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/xplain/XPLAINSystemTableVisitor.java?rev=1484566&r1=1484565&r2=1484566&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/xplain/XPLAINSystemTableVisitor.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/xplain/XPLAINSystemTableVisitor.java
Mon May 20 19:05:51 2013
@@ -79,17 +79,17 @@ public class XPLAINSystemTableVisitor im
     private UUID stmtUUID; // the UUID to save for the resultsets
     
     // now the lists of descriptors regarding the resultsets
-    private List rsets; // for the resultset descriptors
-    private List rsetsTimings; // for the resultset timings descriptors
-    private List sortrsets; // for the sort props descriptors
-    private List scanrsets; // fot the scan props descriptors
+    private List<XPLAINResultSetDescriptor> rsets; // for the resultset descriptors
+    private List<Object> rsetsTimings; // for the resultset timings descriptors
+    private List<XPLAINSortPropsDescriptor> sortrsets; // for the sort props descriptors
+    private List<XPLAINScanPropsDescriptor> scanrsets; // fot the scan props descriptors
     
     // the number of children of the current explained node
     private int noChildren;
     
     // this stack keeps track of the result set UUIDs, which get popped by the
     // children of the current explained node
-    private Stack UUIDStack;
+    private Stack<UUID> UUIDStack;
     
     // ---------------------------------------------------------
     // Constructor
@@ -98,13 +98,13 @@ public class XPLAINSystemTableVisitor im
     public XPLAINSystemTableVisitor(){
         // System.out.println("System Table Visitor created...");
         // initialize lists
-        rsets        = new ArrayList();
-        rsetsTimings = new ArrayList();
-        sortrsets    = new ArrayList();
-        scanrsets    = new ArrayList();
+        rsets        = new ArrayList<XPLAINResultSetDescriptor>();
+        rsetsTimings = new ArrayList<Object>();
+        sortrsets    = new ArrayList<XPLAINSortPropsDescriptor>();
+        scanrsets    = new ArrayList<XPLAINScanPropsDescriptor>();
         
         // init UUIDStack
-        UUIDStack    = new Stack();
+        UUIDStack    = new Stack<UUID>();
         
     }
 
@@ -143,27 +143,27 @@ public class XPLAINSystemTableVisitor im
         
         if(considerTimingInformation){
             timingID = dd.getUUIDFactory().createUUID();
-            rsetsTimings.add( 
+            rsetsTimings.add(
                     statistics.getResultSetTimingsDescriptor(timingID));
         }
         
         UUID sortID = dd.getUUIDFactory().createUUID();
-        Object sortRSDescriptor = statistics.getSortPropsDescriptor(sortID);
+        XPLAINSortPropsDescriptor sortRSDescriptor = (XPLAINSortPropsDescriptor) statistics.getSortPropsDescriptor(sortID);
         if (sortRSDescriptor != null)
             sortrsets.add(sortRSDescriptor);
         else
             sortID = null;
         
         UUID scanID = dd.getUUIDFactory().createUUID();
-        Object scanRSDescriptor = statistics.getScanPropsDescriptor(scanID);
+        XPLAINScanPropsDescriptor scanRSDescriptor = (XPLAINScanPropsDescriptor)statistics.getScanPropsDescriptor(scanID);
         if (scanRSDescriptor != null)
             scanrsets.add(scanRSDescriptor);
         else
             scanID = null;
 
         UUID rsID = dd.getUUIDFactory().createUUID();
-        rsets.add(statistics.getResultSetDescriptor(rsID,
-           UUIDStack.empty()?  null: (UUID)UUIDStack.pop(),
+        rsets.add( (XPLAINResultSetDescriptor) statistics.getResultSetDescriptor(rsID,
+             UUIDStack.empty()?  (UUID)null: UUIDStack.pop(),
            scanID, sortID, stmtUUID, timingID));
         
         pushUUIDnoChildren(rsID);
@@ -364,18 +364,17 @@ public class XPLAINSystemTableVisitor im
     private void addArraysToSystemCatalogs()
         throws StandardException, SQLException
     {
-        Iterator iter;
         boolean statsSave = lcc.getRunTimeStatisticsMode();
         lcc.setRunTimeStatisticsMode(false);
         Connection conn = getDefaultConn();
 
         PreparedStatement ps = conn.prepareStatement(
             (String)lcc.getXplainStatement("SYSXPLAIN_RESULTSETS"));
-        iter = rsets.iterator();
-        while (iter.hasNext())
+        Iterator<XPLAINResultSetDescriptor> rsetsiter = rsets.iterator();
+        while (rsetsiter.hasNext())
         {
             XPLAINResultSetDescriptor rset =
-                (XPLAINResultSetDescriptor)iter.next();
+                rsetsiter.next();
             rset.setStatementParameters(ps);
             ps.executeUpdate();
         }
@@ -386,11 +385,11 @@ public class XPLAINSystemTableVisitor im
         {
             ps = conn.prepareStatement(
                 (String)lcc.getXplainStatement("SYSXPLAIN_RESULTSET_TIMINGS"));
-            iter = rsetsTimings.iterator();
-            while (iter.hasNext())
+            Iterator<Object> timingsiter = rsetsTimings.iterator();
+            while (timingsiter.hasNext())
             {
                 XPLAINResultSetTimingsDescriptor rsetT =
-                    (XPLAINResultSetTimingsDescriptor)iter.next();
+                    (XPLAINResultSetTimingsDescriptor)timingsiter.next();
                 rsetT.setStatementParameters(ps);
                 ps.executeUpdate();
             }
@@ -398,11 +397,11 @@ public class XPLAINSystemTableVisitor im
         }
         ps = conn.prepareStatement(
             (String)lcc.getXplainStatement("SYSXPLAIN_SCAN_PROPS"));
-        iter = scanrsets.iterator();
-        while (iter.hasNext())
+        Iterator<XPLAINScanPropsDescriptor> scaniter = scanrsets.iterator();
+        while (scaniter.hasNext())
         {
             XPLAINScanPropsDescriptor scanProps =
-                (XPLAINScanPropsDescriptor)iter.next();
+                scaniter.next();
             scanProps.setStatementParameters(ps);
             ps.executeUpdate();
         }
@@ -410,11 +409,11 @@ public class XPLAINSystemTableVisitor im
 
         ps = conn.prepareStatement(
             (String)lcc.getXplainStatement("SYSXPLAIN_SORT_PROPS"));
-        iter = sortrsets.iterator();
-        while (iter.hasNext())
+        Iterator<XPLAINSortPropsDescriptor> sortiter = sortrsets.iterator();
+        while (sortiter.hasNext())
         {
             XPLAINSortPropsDescriptor sortProps =
-                (XPLAINSortPropsDescriptor)iter.next();
+                sortiter.next();
             sortProps.setStatementParameters(ps);
             ps.executeUpdate();
         }



Mime
View raw message