db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r1199160 - in /db/derby/code/trunk/java/engine/org/apache/derby: iapi/sql/compile/ impl/sql/compile/
Date Tue, 08 Nov 2011 08:53:52 GMT
Author: kahatlen
Date: Tue Nov  8 08:53:52 2011
New Revision: 1199160

URL: http://svn.apache.org/viewvc?rev=1199160&view=rev
Log:
DERBY-4845: Improve the dependency tracking for our build targets

Make NodeFactory return nodes of type Node (in an iapi package) instead
of QueryTreeNode (which lives in an impl packages) to remove dependencies
on implementation code in iapi code.

Added:
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/compile/Node.java   (with props)
Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/compile/NodeFactory.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BetweenOperatorNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ConditionalNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromBaseTable.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/LikeEscapeOperatorNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/NodeFactoryImpl.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/QueryTreeNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ValueNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj

Added: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/compile/Node.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/compile/Node.java?rev=1199160&view=auto
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/compile/Node.java (added)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/compile/Node.java Tue Nov  8
08:53:52 2011
@@ -0,0 +1,155 @@
+/*
+
+   Derby - Class org.apache.derby.iapi.sql.compile.Node
+
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to you under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
+ */
+
+package org.apache.derby.iapi.sql.compile;
+
+import org.apache.derby.iapi.error.StandardException;
+
+/**
+ * Interface implemented by the nodes created by a {@code NodeFactory}. Callers
+ * of the various {@code NodeFactory.getNode()} methods will typically cast the
+ * returned node to a more specific sub-type, as this interface only contains
+ * the methods needed by {@code NodeFactory} to initialize the node.
+ */
+public interface Node {
+
+    /**
+     * Initialize a query tree node.
+     *
+     * @exception StandardException		Thrown on error
+     */
+    void init(Object arg1) throws StandardException;
+
+    /**
+     * Initialize a query tree node.
+     *
+     * @exception StandardException		Thrown on error
+     */
+    void init(Object arg1, Object arg2) throws StandardException;
+
+    /**
+     * Initialize a query tree node.
+     *
+     * @exception StandardException		Thrown on error
+     */
+    void init(Object arg1, Object arg2, Object arg3) throws StandardException;
+
+    /**
+     * Initialize a query tree node.
+     *
+     * @exception StandardException		Thrown on error
+     */
+    void init(Object arg1, Object arg2, Object arg3, Object arg4)
+            throws StandardException;
+
+    /**
+     * Initialize a query tree node.
+     *
+     * @exception StandardException		Thrown on error
+     */
+    void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5)
+            throws StandardException;
+
+    /**
+     * Initialize a query tree node.
+     *
+     * @exception StandardException		Thrown on error
+     */
+    void init(Object arg1, Object arg2, Object arg3,
+              Object arg4, Object arg5, Object arg6)
+            throws StandardException;
+
+    /**
+     * Initialize a query tree node.
+     *
+     * @exception StandardException		Thrown on error
+     */
+    void init(Object arg1, Object arg2, Object arg3, Object arg4,
+              Object arg5, Object arg6, Object arg7)
+            throws StandardException;
+
+    /**
+     * Initialize a query tree node.
+     *
+     * @exception StandardException		Thrown on error
+     */
+    void init(Object arg1, Object arg2, Object arg3, Object arg4,
+              Object arg5, Object arg6, Object arg7, Object arg8)
+            throws StandardException;
+
+    /**
+     * Initialize a query tree node.
+     *
+     * @exception StandardException		Thrown on error
+     */
+    void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5,
+              Object arg6, Object arg7, Object arg8, Object arg9)
+            throws StandardException;
+
+    /**
+     * Initialize a query tree node.
+     *
+     * @exception StandardException		Thrown on error
+     */
+    void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5,
+              Object arg6, Object arg7, Object arg8, Object arg9, Object arg10)
+            throws StandardException;
+
+    /**
+     * Initialize a query tree node.
+     *
+     * @exception StandardException		Thrown on error
+     */
+    void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5,
+              Object arg6, Object arg7, Object arg8, Object arg9, Object arg10,
+              Object arg11)
+            throws StandardException;
+
+    /**
+     * Initialize a query tree node.
+     *
+     * @exception StandardException		Thrown on error
+     */
+    void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5,
+              Object arg6, Object arg7, Object arg8, Object arg9, Object arg10,
+              Object arg11, Object arg12)
+            throws StandardException;
+
+    /**
+     * Initialize a query tree node.
+     *
+     * @exception StandardException		Thrown on error
+     */
+    void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5,
+              Object arg6, Object arg7, Object arg8, Object arg9, Object arg10,
+              Object arg11, Object arg12, Object arg13)
+            throws StandardException;
+
+    /**
+     * Initialize a query tree node.
+     *
+     * @exception StandardException		Thrown on error
+     */
+    void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5,
+              Object arg6, Object arg7, Object arg8, Object arg9, Object arg10,
+              Object arg11, Object arg12, Object arg13, Object arg14)
+            throws StandardException;
+}

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/compile/Node.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/compile/NodeFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/compile/NodeFactory.java?rev=1199160&r1=1199159&r2=1199160&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/compile/NodeFactory.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/compile/NodeFactory.java Tue
Nov  8 08:53:52 2011
@@ -25,12 +25,6 @@ import org.apache.derby.iapi.services.co
 
 import org.apache.derby.iapi.error.StandardException;
 
-/* Strictly speaking we shouldn't import classes under the impl hierarchy here
- * but this is work in progress.
- * manish - Wed Mar 28 13:05:19 PST 2001
- */
-import	org.apache.derby.impl.sql.compile.QueryTreeNode;
-
 /**
 	This is an interface for NodeFactories.
 	<p>
@@ -63,7 +57,7 @@ public abstract class NodeFactory
 	 *
 	 * @exception StandardException		Thrown on error.
 	 */
-	public abstract QueryTreeNode getNode(int nodeType,
+	public abstract Node getNode(int nodeType,
 							ContextManager cm) throws StandardException;
 
 	/**
@@ -77,10 +71,10 @@ public abstract class NodeFactory
 	 *
 	 * @exception StandardException		Thrown on error.
 	 */
-	public final QueryTreeNode getNode(int nodeType, Object arg1, ContextManager cm)
+	public final Node getNode(int nodeType, Object arg1, ContextManager cm)
 													throws StandardException
 	{
-		QueryTreeNode retval = getNode(nodeType, cm);
+		Node retval = getNode(nodeType, cm);
 
 		retval.init(arg1);
 
@@ -99,13 +93,13 @@ public abstract class NodeFactory
 	 *
 	 * @exception StandardException		Thrown on error.
 	 */
-	public final QueryTreeNode getNode(int nodeType,
+	public final Node getNode(int nodeType,
 							Object arg1,
 							Object arg2,
 							ContextManager cm)
 								throws StandardException
 	{
-		QueryTreeNode retval =  getNode(nodeType, cm);
+		Node retval =  getNode(nodeType, cm);
 
 		retval.init(arg1, arg2);
 
@@ -125,14 +119,14 @@ public abstract class NodeFactory
 	 *
 	 * @exception StandardException		Thrown on error.
 	 */
-	public final QueryTreeNode getNode(int nodeType,
+	public final Node getNode(int nodeType,
 							Object arg1,
 							Object arg2,
 							Object arg3,
 							ContextManager cm)
 								throws StandardException
 	{
-		QueryTreeNode retval =  getNode(nodeType, cm);
+		Node retval =  getNode(nodeType, cm);
 
 		retval.init(arg1, arg2, arg3);
 
@@ -153,7 +147,7 @@ public abstract class NodeFactory
 	 *
 	 * @exception StandardException		Thrown on error.
 	 */
-	public QueryTreeNode getNode(int nodeType,
+	public Node getNode(int nodeType,
 							Object arg1,
 							Object arg2,
 							Object arg3,
@@ -161,7 +155,7 @@ public abstract class NodeFactory
 							ContextManager cm)
 								throws StandardException
 	{
-		QueryTreeNode retval =  getNode(nodeType, cm);
+		Node retval =  getNode(nodeType, cm);
 
 		retval.init(arg1, arg2, arg3, arg4);
 
@@ -184,7 +178,7 @@ public abstract class NodeFactory
 	 *
 	 * @exception StandardException		Thrown on error.
 	 */
-	public QueryTreeNode getNode(int nodeType,
+	public Node getNode(int nodeType,
 							Object arg1,
 							Object arg2,
 							Object arg3,
@@ -193,7 +187,7 @@ public abstract class NodeFactory
 							ContextManager cm)
 								throws StandardException
 	{
-		QueryTreeNode retval =  getNode(nodeType, cm);
+		Node retval =  getNode(nodeType, cm);
 
 		retval.init(arg1, arg2, arg3, arg4, arg5);
 
@@ -216,7 +210,7 @@ public abstract class NodeFactory
 	 *
 	 * @exception StandardException		Thrown on error.
 	 */
-	public final QueryTreeNode getNode(int nodeType,
+	public final Node getNode(int nodeType,
 							Object arg1,
 							Object arg2,
 							Object arg3,
@@ -226,7 +220,7 @@ public abstract class NodeFactory
 							ContextManager cm)
 								throws StandardException
 	{
-		QueryTreeNode retval =  getNode(nodeType, cm);
+		Node retval =  getNode(nodeType, cm);
 
 		retval.init(arg1, arg2, arg3, arg4, arg5, arg6);
 
@@ -250,7 +244,7 @@ public abstract class NodeFactory
 	 *
 	 * @exception StandardException		Thrown on error.
 	 */
-	public final QueryTreeNode getNode(int nodeType,
+	public final Node getNode(int nodeType,
 							Object arg1,
 							Object arg2,
 							Object arg3,
@@ -261,7 +255,7 @@ public abstract class NodeFactory
 							ContextManager cm)
 								throws StandardException
 	{
-		QueryTreeNode retval =  getNode(nodeType, cm);
+		Node retval =  getNode(nodeType, cm);
 
 		retval.init(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
 
@@ -285,7 +279,7 @@ public abstract class NodeFactory
 	 *
 	 * @exception StandardException		Thrown on error.
 	 */
-	public final QueryTreeNode getNode(int nodeType,
+	public final Node getNode(int nodeType,
 							Object arg1,
 							Object arg2,
 							Object arg3,
@@ -297,7 +291,7 @@ public abstract class NodeFactory
 							ContextManager cm)
 								throws StandardException
 	{
-		QueryTreeNode retval =  getNode(nodeType, cm);
+		Node retval =  getNode(nodeType, cm);
 
 		retval.init(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
 
@@ -322,7 +316,7 @@ public abstract class NodeFactory
 	 *
 	 * @exception StandardException		Thrown on error.
 	 */
-	public final QueryTreeNode getNode(int nodeType,
+	public final Node getNode(int nodeType,
 							Object arg1,
 							Object arg2,
 							Object arg3,
@@ -335,7 +329,7 @@ public abstract class NodeFactory
 							ContextManager cm)
 								throws StandardException
 	{
-		QueryTreeNode retval =  getNode(nodeType, cm);
+		Node retval =  getNode(nodeType, cm);
 
 		retval.init(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
 
@@ -361,7 +355,7 @@ public abstract class NodeFactory
 	 *
 	 * @exception StandardException		Thrown on error.
 	 */
-	public final QueryTreeNode getNode(int nodeType,
+	public final Node getNode(int nodeType,
 							Object arg1,
 							Object arg2,
 							Object arg3,
@@ -375,7 +369,7 @@ public abstract class NodeFactory
 							ContextManager cm)
 								throws StandardException
 	{
-		QueryTreeNode retval =  getNode(nodeType, cm);
+		Node retval =  getNode(nodeType, cm);
 
 		retval.init(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9,
 					arg10);
@@ -403,7 +397,7 @@ public abstract class NodeFactory
 	 *
 	 * @exception StandardException		Thrown on error.
 	 */
-	public final QueryTreeNode getNode(int nodeType,
+	public final Node getNode(int nodeType,
 							Object arg1,
 							Object arg2,
 							Object arg3,
@@ -418,7 +412,7 @@ public abstract class NodeFactory
 							ContextManager cm)
 								throws StandardException
 	{
-		QueryTreeNode retval =  getNode(nodeType, cm);
+		Node retval =  getNode(nodeType, cm);
 
 		retval.init(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9,
 					arg10, arg11);
@@ -447,7 +441,7 @@ public abstract class NodeFactory
 	 *
 	 * @exception StandardException		Thrown on error.
 	 */
-	public final QueryTreeNode getNode(int nodeType,
+	public final Node getNode(int nodeType,
 							Object arg1,
 							Object arg2,
 							Object arg3,
@@ -463,7 +457,7 @@ public abstract class NodeFactory
 							ContextManager cm)
 								throws StandardException
 	{
-		QueryTreeNode retval =  getNode(nodeType, cm);
+		Node retval =  getNode(nodeType, cm);
 
 		retval.init(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9,
 					arg10, arg11, arg12);
@@ -493,7 +487,7 @@ public abstract class NodeFactory
 	 *
 	 * @exception StandardException		Thrown on error.
 	 */
-	public final QueryTreeNode getNode(int nodeType,
+	public final Node getNode(int nodeType,
 							Object arg1,
 							Object arg2,
 							Object arg3,
@@ -510,7 +504,7 @@ public abstract class NodeFactory
 							ContextManager cm)
 								throws StandardException
 	{
-		QueryTreeNode retval =  getNode(nodeType, cm);
+		Node retval =  getNode(nodeType, cm);
 
 		retval.init(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9,
 					arg10, arg11, arg12, arg13);
@@ -541,7 +535,7 @@ public abstract class NodeFactory
 	 *
 	 * @exception StandardException		Thrown on error.
 	 */
-	public final QueryTreeNode getNode(int nodeType,
+	public final Node getNode(int nodeType,
 							Object arg1,
 							Object arg2,
 							Object arg3,
@@ -559,7 +553,7 @@ public abstract class NodeFactory
 							ContextManager cm)
 								throws StandardException
 	{
-		QueryTreeNode retval =  getNode(nodeType, cm);
+		Node retval =  getNode(nodeType, cm);
 
 		retval.init(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9,
 					arg10, arg11, arg12, arg13, arg14);

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BetweenOperatorNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BetweenOperatorNode.java?rev=1199160&r1=1199159&r2=1199160&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BetweenOperatorNode.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BetweenOperatorNode.java
Tue Nov  8 08:53:52 2011
@@ -213,7 +213,7 @@ public class BetweenOperatorNode extends
 		NodeFactory nodeFactory = getNodeFactory();
 		ContextManager cm = getContextManager();
 
-        QueryTreeNode trueNode = nodeFactory.getNode(
+        QueryTreeNode trueNode = (QueryTreeNode) nodeFactory.getNode(
 											C_NodeTypes.BOOLEAN_CONSTANT_NODE,
 											Boolean.TRUE,
 											cm);

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ConditionalNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ConditionalNode.java?rev=1199160&r1=1199159&r2=1199160&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ConditionalNode.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ConditionalNode.java
Tue Nov  8 08:53:52 2011
@@ -354,12 +354,11 @@ public class ConditionalNode extends Val
 	private QueryTreeNode recastNullNode(ValueNode nodeToCast,
 		DataTypeDescriptor typeToUse) throws StandardException
 	{
-		QueryTreeNode cast = getNodeFactory().getNode(
+		return (QueryTreeNode) getNodeFactory().getNode(
 					C_NodeTypes.CAST_NODE,
 					((CastNode)nodeToCast).castOperand,
 					typeToUse,
 					getContextManager());
-		return cast;
 	}
 
 	/**
@@ -402,7 +401,7 @@ public class ConditionalNode extends Val
 			 * The untyped NULL should have a data type descriptor
 			 * that allows its value to be nullable.
 			 */
-			QueryTreeNode cast = getNodeFactory().getNode(
+			QueryTreeNode cast = (QueryTreeNode) getNodeFactory().getNode(
 						C_NodeTypes.CAST_NODE,
 						thenElseList.elementAt(0), 
 						bcon.getLeftOperand().getTypeServices().getNullabilityType(true),

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromBaseTable.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromBaseTable.java?rev=1199160&r1=1199159&r2=1199160&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromBaseTable.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromBaseTable.java Tue
Nov  8 08:53:52 2011
@@ -2409,8 +2409,8 @@ public class FromBaseTable extends FromT
         // call is an indication that we are mapping to a no-argument VTI. Since
         // we have the table descriptor we do not need to pass in a TableName.
         // See NewInvocationNode for more.
-        QueryTreeNode newNode =
-                getNodeFactory().getNode(C_NodeTypes.NEW_INVOCATION_NODE,
+        QueryTreeNode newNode = (QueryTreeNode) getNodeFactory().getNode(
+                C_NodeTypes.NEW_INVOCATION_NODE,
                 null, // TableName
                 td, // TableDescriptor
                 Collections.EMPTY_LIST,
@@ -2420,7 +2420,8 @@ public class FromBaseTable extends FromT
         QueryTreeNode vtiNode;
 
         if (correlationName != null) {
-            vtiNode = getNodeFactory().getNode(C_NodeTypes.FROM_VTI,
+            vtiNode = (QueryTreeNode) getNodeFactory().getNode(
+                    C_NodeTypes.FROM_VTI,
                     newNode,
                     correlationName,
                     resultColumns,
@@ -2430,7 +2431,8 @@ public class FromBaseTable extends FromT
             TableName exposedName = newNode.makeTableName(td.getSchemaName(),
                     td.getDescriptorName());
 
-            vtiNode = getNodeFactory().getNode(C_NodeTypes.FROM_VTI,
+            vtiNode = (QueryTreeNode) getNodeFactory().getNode(
+                    C_NodeTypes.FROM_VTI,
                     newNode,
                     correlationName,
                     resultColumns,

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/LikeEscapeOperatorNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/LikeEscapeOperatorNode.java?rev=1199160&r1=1199159&r2=1199160&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/LikeEscapeOperatorNode.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/LikeEscapeOperatorNode.java
Tue Nov  8 08:53:52 2011
@@ -673,7 +673,7 @@ public final class LikeEscapeOperatorNod
             {
                 // pattern string is a constant
                 likeLTopt = 
-                    getNodeFactory().getNode(
+                    (QueryTreeNode) getNodeFactory().getNode(
                         C_NodeTypes.CHAR_CONSTANT_NODE,
                         lessThanString,
                         getContextManager());
@@ -901,7 +901,7 @@ public final class LikeEscapeOperatorNod
         if (escapeNode != null)
             param.add(escapeNode);
 
-        QueryTreeNode maxWidthNode = getNodeFactory().getNode(
+        QueryTreeNode maxWidthNode = (QueryTreeNode) getNodeFactory().getNode(
             C_NodeTypes.INT_CONSTANT_NODE,
             new Integer(maxWidth),
             getContextManager());

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/NodeFactoryImpl.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/NodeFactoryImpl.java?rev=1199160&r1=1199159&r2=1199160&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/NodeFactoryImpl.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/NodeFactoryImpl.java
Tue Nov  8 08:53:52 2011
@@ -31,6 +31,7 @@ import org.apache.derby.iapi.services.mo
 
 import org.apache.derby.iapi.sql.compile.Optimizer;
 
+import org.apache.derby.iapi.sql.compile.Node;
 import org.apache.derby.iapi.sql.compile.NodeFactory;
 import org.apache.derby.iapi.sql.compile.C_NodeTypes;
 
@@ -133,7 +134,7 @@ public class NodeFactoryImpl extends Nod
 	 *
 	 * @exception StandardException		Thrown on error
 	 */
-	public QueryTreeNode getNode(int nodeType, ContextManager cm)
+	public Node getNode(int nodeType, ContextManager cm)
 											throws StandardException
 	{
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/QueryTreeNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/QueryTreeNode.java?rev=1199160&r1=1199159&r2=1199160&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/QueryTreeNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/QueryTreeNode.java Tue
Nov  8 08:53:52 2011
@@ -43,6 +43,7 @@ import org.apache.derby.iapi.services.sa
 import org.apache.derby.iapi.sql.StatementType;
 import org.apache.derby.iapi.sql.compile.C_NodeTypes;
 import org.apache.derby.iapi.sql.compile.CompilerContext;
+import org.apache.derby.iapi.sql.compile.Node;
 import org.apache.derby.iapi.sql.compile.NodeFactory;
 import org.apache.derby.iapi.sql.compile.Parser;
 import org.apache.derby.iapi.sql.compile.TypeCompiler;
@@ -69,7 +70,7 @@ import org.apache.derby.impl.sql.execute
  *
  */
 
-public abstract class QueryTreeNode implements Visitable
+public abstract class QueryTreeNode implements Node, Visitable
 {
 	public static final int AUTOINCREMENT_START_INDEX = 0;
 	public static final int AUTOINCREMENT_INC_INDEX   = 1;

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ValueNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ValueNode.java?rev=1199160&r1=1199159&r2=1199160&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ValueNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ValueNode.java Tue Nov
 8 08:53:52 2011
@@ -613,7 +613,7 @@ public abstract class ValueNode extends 
 	{
 		NodeFactory		nodeFactory = getNodeFactory();
 
-        QueryTreeNode trueNode = nodeFactory.getNode(
+        QueryTreeNode trueNode = (QueryTreeNode) nodeFactory.getNode(
 										C_NodeTypes.BOOLEAN_CONSTANT_NODE,
 										Boolean.TRUE,
 										getContextManager());

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj?rev=1199160&r1=1199159&r2=1199160&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj Tue Nov
 8 08:53:52 2011
@@ -3437,7 +3437,7 @@ targetTable() throws StandardException :
 	LOOKAHEAD( { newInvocationFollows(1) } )
 	javaToSQLNode = newInvocation()
 	{
-		return nodeFactory.getNode(
+		return (QueryTreeNode) nodeFactory.getNode(
 								C_NodeTypes.FROM_VTI,
 								javaToSQLNode.getJavaValueNode(), 
 								correlationName,
@@ -7718,7 +7718,8 @@ newInvocation() throws StandardException
 		{
 			checkInternalFeature(javaClassName);
 		}
-		newNode =  nodeFactory.getNode(C_NodeTypes.NEW_INVOCATION_NODE,
+		newNode = (QueryTreeNode) nodeFactory.getNode(
+									   C_NodeTypes.NEW_INVOCATION_NODE,
 									   javaClassName,
 									   parameterList, 
 									   lastTokenDelimitedIdentifier,



Mime
View raw message