db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r1506827 [1/4] - in /db/derby/code/trunk/java/engine/org/apache/derby: iapi/services/context/ impl/sql/compile/
Date Thu, 25 Jul 2013 07:12:49 GMT
Author: dag
Date: Thu Jul 25 07:12:46 2013
New Revision: 1506827

URL: http://svn.apache.org/r1506827
Log:
DERBY-673: Get rid of the NodeFactory

Patch derby-673-nuke-ctypes-without-enum-3.

This patch removes the usage of the global nodeType integer (see
QueryTreeNode) defined by C_NodeType.java. After the removal of the
node factory, this global quantity whose use mimicked "instanceof" can
be discarded, mostly. For some node which represent several logical
node types, e.g. BinaryArithmeticOperatorNode which can represent for
example both + and minus, a new quantity, "kind" is introduced to
differentiate between the logical types of nodes.

We introduce a default method ValueNode#isSameNodeKind which the
classes that implement several kinds need to override to add the extra
kind check. This is then called from the isEquivalent overrides as
needed.

JavaDoc for isSameNodeKind:

/**
 * Some node classes represent several logical node types (to reduce
 * footprint), which we call kinds.
 * This means that implementations of {@link #isEquivalent()}
 * cannot always just use instanceof to check if the other node
 * represents the same kind. Hence this method needs to be
 * implemented by all node classes that represent several kinds.
 * It is only called from implementations of isEquivalent.
 *
 * @param other The other value node whose kind we want to compare with.
 * @return true if this and o represent the same
 *         logical node type, i.e. kind.
 */

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/context/ContextManager.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AggregateNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AggregateWindowFunctionNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AllResultColumn.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AlterTableNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AndNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BaseColumnNode.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/BinaryArithmeticOperatorNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryListOperatorNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryOperatorNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryRelationalOperatorNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BitConstantNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BooleanConstantNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CallStatementNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CastNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CharConstantNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CoalesceFunctionNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ColumnDefinitionNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ColumnReference.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ConcatenationOperatorNode.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/ConstantNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ConstraintDefinitionNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateAliasNode.java
    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/CreateRoleNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateSchemaNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateSequenceNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateTableNode.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/CreateViewNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CurrentDatetimeOperatorNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CurrentOfNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CurrentRowLocationNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CursorNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DB2LengthOperatorNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DefaultNode.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/DistinctNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DropAliasNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DropIndexNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DropRoleNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DropSchemaNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DropSequenceNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DropTableNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DropTriggerNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DropViewNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ExecSPSNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ExtractOperatorNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FKConstraintDefinitionNode.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/FromList.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromSubquery.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromVTI.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/GenerationClauseNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/GetCurrentConnectionNode.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/GrantRoleNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/GroupByColumn.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/GroupByList.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/GroupByNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/HalfOuterJoinNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/HashTableNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/InListOperatorNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/IndexToBaseRowNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/InsertNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/IntersectOrExceptNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/IsNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/IsNullNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/JavaToSQLValueNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/JoinNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/LengthOperatorNode.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/LockTableNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/MaterializeResultSetNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/MaterializeSubqueryNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ModifyColumnNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/NOPStatementNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/NewInvocationNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/NextSequenceNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/NonStaticMethodCallNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/NormalizeResultSetNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/NotNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/NumericConstantNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/OrNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/OrderByColumn.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/OrderByList.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/OrderByNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ParameterNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/Predicate.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/PredicateList.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/PrivilegeNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ProjectRestrictNode.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/RenameNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ResultColumn.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ResultColumnList.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/compile/RevokeRoleNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/RowCountNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/RowNumberFunctionNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/RowResultSetNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SQLToJavaValueNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SavepointNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ScrollInsensitiveResultSetNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SelectNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SetRoleNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SetSchemaNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SetTransactionIsolationNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SimpleStringOperatorNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SpecialFunctionNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/StaticClassFieldReferenceNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/StaticMethodCallNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SubqueryList.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SubqueryNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TableElementList.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TableElementNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TableName.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TablePrivilegesNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TernaryOperatorNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TestConstraintNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TimestampOperatorNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UnaryArithmeticOperatorNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UnaryDateTimestampOperatorNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UnaryOperatorNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UnionNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UntypedNullConstantNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UpdateNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UserTypeConstantNode.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/ValueNodeList.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/VarbitConstantNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/VirtualColumnNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/WindowDefinitionNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/WindowReferenceNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/WindowResultSetNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/XMLConstantNode.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/context/ContextManager.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/context/ContextManager.java?rev=1506827&r1=1506826&r2=1506827&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/context/ContextManager.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/context/ContextManager.java Thu Jul 25 07:12:46 2013
@@ -237,8 +237,9 @@ public class ContextManager
 	 */
     public final List<Context> getContextStack(String contextId) {
 		final CtxStack cs = ctxTable.get(contextId);
-        final List<Context> el = Collections.emptyList();
-        return cs==null ? el : cs.getUnmodifiableList();
+        return cs == null ?
+               Collections.<Context>emptyList() :
+               cs.getUnmodifiableList();
 	}
     
     /**

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AggregateNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AggregateNode.java?rev=1506827&r1=1506826&r2=1506827&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AggregateNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AggregateNode.java Thu Jul 25 07:12:46 2013
@@ -30,7 +30,6 @@ import org.apache.derby.iapi.services.co
 import org.apache.derby.iapi.services.loader.ClassFactory;
 import org.apache.derby.iapi.services.loader.ClassInspector;
 import org.apache.derby.iapi.services.sanity.SanityManager;
-import org.apache.derby.iapi.sql.compile.C_NodeTypes;
 import org.apache.derby.iapi.sql.compile.CompilerContext;
 import org.apache.derby.iapi.sql.dictionary.AliasDescriptor;
 import org.apache.derby.iapi.sql.dictionary.DataDictionary;
@@ -84,7 +83,6 @@ class AggregateNode extends UnaryOperato
             String aggregateName,
             ContextManager cm) throws StandardException {
         super(operand, cm);
-        setNodeType(C_NodeTypes.AGGREGATE_NODE);
         this.aggregateName = aggregateName;
         setUserDefinedAggregate(uadClass);
         this.distinct = distinct;
@@ -108,7 +106,6 @@ class AggregateNode extends UnaryOperato
             String aggregateName,
             ContextManager cm) throws StandardException {
         super(operand, cm);
-        setNodeType(C_NodeTypes.AGGREGATE_NODE);
         this.aggregateName = aggregateName;
         this.userAggregateName = uadClass;
         this.distinct = distinct;
@@ -131,7 +128,6 @@ class AggregateNode extends UnaryOperato
             String aggregateName,
             ContextManager cm) throws StandardException {
         super(operand, cm);
-        setNodeType(C_NodeTypes.AGGREGATE_NODE);
         this.aggregateName = aggregateName;
         this.aggregateDefinitionClass = uadClass;
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AggregateWindowFunctionNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AggregateWindowFunctionNode.java?rev=1506827&r1=1506826&r2=1506827&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AggregateWindowFunctionNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AggregateWindowFunctionNode.java Thu Jul 25 07:12:46 2013
@@ -25,7 +25,6 @@ import org.apache.derby.iapi.error.Stand
 import org.apache.derby.iapi.services.sanity.SanityManager;
 import org.apache.derby.iapi.reference.SQLState;
 import org.apache.derby.iapi.services.context.ContextManager;
-import org.apache.derby.iapi.sql.compile.C_NodeTypes;
 
 
 /**
@@ -42,7 +41,6 @@ final class AggregateWindowFunctionNode 
             ContextManager cm) throws StandardException {
 
         super(null, "?", w, cm);
-        setNodeType(C_NodeTypes.AGGREGATE_WINDOW_FUNCTION_NODE);
         aggregateFunction = agg;
 
         throw StandardException.newException(

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AllResultColumn.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AllResultColumn.java?rev=1506827&r1=1506826&r2=1506827&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AllResultColumn.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AllResultColumn.java Thu Jul 25 07:12:46 2013
@@ -24,7 +24,6 @@ package	org.apache.derby.impl.sql.compil
 import org.apache.derby.iapi.error.StandardException;
 import org.apache.derby.iapi.services.context.ContextManager;
 import org.apache.derby.iapi.services.sanity.SanityManager;
-import org.apache.derby.iapi.sql.compile.C_NodeTypes;
 
 /**
  * An AllResultColumn represents a "*" result column in a SELECT
@@ -39,7 +38,6 @@ class AllResultColumn extends ResultColu
 
     AllResultColumn(TableName tableName, ContextManager cm) {
         super(cm);
-        setNodeType(C_NodeTypes.ALL_RESULT_COLUMN);
         this.tableName = tableName;
     }
 	/** 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AlterTableNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AlterTableNode.java?rev=1506827&r1=1506826&r2=1506827&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AlterTableNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AlterTableNode.java Thu Jul 25 07:12:46 2013
@@ -27,7 +27,6 @@ import org.apache.derby.iapi.reference.S
 import org.apache.derby.iapi.services.context.ContextManager;
 import org.apache.derby.iapi.services.io.FormatableBitSet;
 import org.apache.derby.iapi.services.sanity.SanityManager;
-import org.apache.derby.iapi.sql.compile.C_NodeTypes;
 import org.apache.derby.iapi.sql.compile.Visitor;
 import org.apache.derby.iapi.sql.dictionary.ConglomerateDescriptor;
 import org.apache.derby.iapi.sql.dictionary.ConstraintDescriptorList;
@@ -117,7 +116,6 @@ class AlterTableNode extends DDLStatemen
         super(tableName, cm);
 		truncateTable = true;
 		schemaDescriptor = getSchemaDescriptor();
-        setNodeType(C_NodeTypes.ALTER_TABLE_NODE);
 	}
 	
 	/**
@@ -137,7 +135,6 @@ class AlterTableNode extends DDLStatemen
         this.sequential = sequential;
 		compressTable = true;
 		schemaDescriptor = getSchemaDescriptor();
-        setNodeType(C_NodeTypes.ALTER_TABLE_NODE);
 	}
 
 	/**
@@ -162,7 +159,6 @@ class AlterTableNode extends DDLStatemen
         this.truncateEndOfTable = truncateEndOfTable;
 		compressTable = true;
 		schemaDescriptor = getSchemaDescriptor(true, false);
-        setNodeType(C_NodeTypes.ALTER_TABLE_NODE);
 	}
 
     /**
@@ -205,7 +201,6 @@ class AlterTableNode extends DDLStatemen
         }
 
         schemaDescriptor = getSchemaDescriptor();
-        setNodeType(C_NodeTypes.ALTER_TABLE_NODE);
     }
 
     /**
@@ -243,7 +238,6 @@ class AlterTableNode extends DDLStatemen
                 }
         }
         schemaDescriptor = getSchemaDescriptor();
-        setNodeType(C_NodeTypes.ALTER_TABLE_NODE);
     }
 
     /**

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AndNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AndNode.java?rev=1506827&r1=1506826&r2=1506827&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AndNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/AndNode.java Thu Jul 25 07:12:46 2013
@@ -25,7 +25,6 @@ import java.util.List;
 import org.apache.derby.iapi.error.StandardException;
 import org.apache.derby.iapi.services.context.ContextManager;
 import org.apache.derby.iapi.services.sanity.SanityManager;
-import org.apache.derby.iapi.sql.compile.C_NodeTypes;
 
 class AndNode extends BinaryLogicalOperatorNode
 {
@@ -40,7 +39,6 @@ class AndNode extends BinaryLogicalOpera
             ValueNode rightOperand,
             ContextManager cm) throws StandardException {
         super(leftOperand, rightOperand, "and", cm);
-        setNodeType(C_NodeTypes.AND_NODE);
         this.shortCircuitValue = false;
     }
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BaseColumnNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BaseColumnNode.java?rev=1506827&r1=1506826&r2=1506827&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BaseColumnNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BaseColumnNode.java Thu Jul 25 07:12:46 2013
@@ -170,14 +170,14 @@ class BaseColumnNode extends ValueNode
     /**
      * {@inheritDoc}
      */
-	protected boolean isEquivalent(ValueNode o)
+    boolean isEquivalent(ValueNode o)
 	{
-		if (isSameNodeType(o)) 
-		{
+        if (isSameNodeKind(o)) {
 			BaseColumnNode other = (BaseColumnNode)o;
 			return other.tableName.equals(tableName)
 			&& other.columnName.equals(columnName);
 		} 
+
 		return false;
 	}
 }

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=1506827&r1=1506826&r2=1506827&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 Thu Jul 25 07:12:46 2013
@@ -25,7 +25,6 @@ import org.apache.derby.iapi.error.Stand
 import org.apache.derby.iapi.services.compiler.MethodBuilder;
 import org.apache.derby.iapi.services.context.ContextManager;
 import org.apache.derby.iapi.services.sanity.SanityManager;
-import org.apache.derby.iapi.sql.compile.C_NodeTypes;
 
 /**
  * A BetweenOperatorNode represents a BETWEEN clause. The between values are
@@ -45,7 +44,6 @@ class BetweenOperatorNode extends Binary
             ValueNodeList betweenValues,
             ContextManager cm) throws StandardException {
         super(leftOperand, vetValues(betweenValues), "BETWEEN", null, cm);
-        setNodeType(C_NodeTypes.BETWEEN_OPERATOR_NODE);
     }
 
     private static ValueNodeList vetValues(ValueNodeList betweenValues) {
@@ -112,11 +110,11 @@ class BetweenOperatorNode extends Binary
 
 		/* leftO < rightOList.elementAt(0) */
         leftBCO = new BinaryRelationalOperatorNode(
-									C_NodeTypes.BINARY_LESS_THAN_OPERATOR_NODE,
-									leftOperand, 
-                                    rightOperandList.elementAt(0),
-                                    false,
-									cm);
+                BinaryRelationalOperatorNode.K_LESS_THAN,
+                leftOperand,
+                rightOperandList.elementAt(0),
+                false,
+                cm);
 		/* Set type info for the operator node */
 		leftBCO.bindComparisonOperator();
 
@@ -128,11 +126,11 @@ class BetweenOperatorNode extends Binary
 
 		/* leftO > rightOList.elementAt(1) */
         rightBCO = new BinaryRelationalOperatorNode(
-								C_NodeTypes.BINARY_GREATER_THAN_OPERATOR_NODE,
-								leftClone,
-                                rightOperandList.elementAt(1),
-                                false,
-								cm);
+                BinaryRelationalOperatorNode.K_GREATER_THAN,
+                leftClone,
+                rightOperandList.elementAt(1),
+                false,
+                cm);
 		/* Set type info for the operator node */
 		rightBCO.bindComparisonOperator();
 
@@ -207,11 +205,11 @@ class BetweenOperatorNode extends Binary
 		/* Create the AND <= */
 		BinaryComparisonOperatorNode lessEqual = 
             new BinaryRelationalOperatorNode(
-						C_NodeTypes.BINARY_LESS_EQUALS_OPERATOR_NODE,
-						leftClone1, 
-                        rightOperandList.elementAt(1),
-                        false,
-						cm);
+                BinaryRelationalOperatorNode.K_LESS_EQUALS,
+                leftClone1,
+                rightOperandList.elementAt(1),
+                false,
+                cm);
 
 		/* Set type info for the operator node */
 		lessEqual.bindComparisonOperator();
@@ -223,11 +221,11 @@ class BetweenOperatorNode extends Binary
 		/* Create the AND >= */
 		BinaryComparisonOperatorNode greaterEqual = 
             new BinaryRelationalOperatorNode(
-					C_NodeTypes.BINARY_GREATER_EQUALS_OPERATOR_NODE,
-					leftOperand, 
-                    rightOperandList.elementAt(0),
-                    false,
-					cm);
+                BinaryRelationalOperatorNode.K_GREATER_EQUALS,
+                leftOperand,
+                rightOperandList.elementAt(0),
+                false,
+                cm);
 
 		/* Set type info for the operator node */
 		greaterEqual.bindComparisonOperator();
@@ -276,21 +274,21 @@ class BetweenOperatorNode extends Binary
 
 		/* leftO >= rightOList.elementAt(0) */
         leftBCO = new BinaryRelationalOperatorNode(
-							C_NodeTypes.BINARY_GREATER_EQUALS_OPERATOR_NODE,
-							leftOperand, 
-                            rightOperandList.elementAt(0),
-                            false,
-							cm);
+                BinaryRelationalOperatorNode.K_GREATER_EQUALS,
+                leftOperand,
+                rightOperandList.elementAt(0),
+                false,
+                cm);
 		/* Set type info for the operator node */
 		leftBCO.bindComparisonOperator();
 
 		/* leftO <= rightOList.elementAt(1) */
         rightBCO = new BinaryRelationalOperatorNode(
-						C_NodeTypes.BINARY_LESS_EQUALS_OPERATOR_NODE,
-						leftOperand, 
-                        rightOperandList.elementAt(1),
-                        false,
-						cm);
+                BinaryRelationalOperatorNode.K_LESS_EQUALS,
+                leftOperand,
+                rightOperandList.elementAt(1),
+                false,
+                cm);
 		/* Set type info for the operator node */
 		rightBCO.bindComparisonOperator();
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryArithmeticOperatorNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryArithmeticOperatorNode.java?rev=1506827&r1=1506826&r2=1506827&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryArithmeticOperatorNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryArithmeticOperatorNode.java Thu Jul 25 07:12:46 2013
@@ -26,7 +26,6 @@ import org.apache.derby.iapi.error.Stand
 import org.apache.derby.iapi.reference.ClassName;
 import org.apache.derby.iapi.services.context.ContextManager;
 import org.apache.derby.iapi.services.sanity.SanityManager;
-import org.apache.derby.iapi.sql.compile.C_NodeTypes;
 import org.apache.derby.iapi.sql.compile.TypeCompiler;
 import org.apache.derby.iapi.types.DataTypeDescriptor;
 import org.apache.derby.iapi.types.TypeId;
@@ -38,16 +37,31 @@ import org.apache.derby.iapi.types.TypeI
 
 public final class BinaryArithmeticOperatorNode extends BinaryOperatorNode
 {
+    // Allowed kinds
+    final static int K_DIVIDE = 0;
+    final static int K_MINUS = 1;
+    final static int K_PLUS = 2;
+    final static int K_TIMES = 3;
+    final static int K_MOD = 4;
+
+    /**
+     * This class is used to hold logically different objects for
+     * space efficiency. {@code kind} represents the logical object
+     * type. See also {@link ValueNode#isSameNodeKind}.
+     */
+    final int kind;
+
 	/**
      * Constructor for a BinaryArithmeticOperatorNode
 	 *
+     * @param kind          The kind of operator
 	 * @param leftOperand	The left operand
 	 * @param rightOperand	The right operand
      * @param cm            The context manager
 	 */
 
     BinaryArithmeticOperatorNode(
-            int nodeType,
+            int kind,
             ValueNode leftOperand,
             ValueNode rightOperand,
             ContextManager cm)
@@ -57,52 +71,46 @@ public final class BinaryArithmeticOpera
               ClassName.NumberDataValue,
               ClassName.NumberDataValue,
               cm);
-        setNodeType(nodeType);
-	}
+        this.kind = kind;
 
-    @Override
-    void setNodeType(int nodeType)
-	{
-        String op = null;
-        String mNam = null;
+        final String op;
+        final String mNam;
 
-		switch (nodeType)
+        switch (kind)
 		{
-			case C_NodeTypes.BINARY_DIVIDE_OPERATOR_NODE:
+            case K_DIVIDE:
                 op = TypeCompiler.DIVIDE_OP;
                 mNam = "divide";
 				break;
 
-			case C_NodeTypes.BINARY_MINUS_OPERATOR_NODE:
+            case K_MINUS:
                 op = TypeCompiler.MINUS_OP;
                 mNam = "minus";
 				break;
 
-			case C_NodeTypes.BINARY_PLUS_OPERATOR_NODE:
+            case K_PLUS:
                 op = TypeCompiler.PLUS_OP;
                 mNam = "plus";
 				break;
 
-			case C_NodeTypes.BINARY_TIMES_OPERATOR_NODE:
+            case K_TIMES:
                 op = TypeCompiler.TIMES_OP;
                 mNam = "times";
 				break;
 
-			case C_NodeTypes.MOD_OPERATOR_NODE:
+            case K_MOD:
                 op = TypeCompiler.MOD_OP;
                 mNam = "mod";
 				break;
-
-			default:
-				if (SanityManager.DEBUG)
-				{
-					SanityManager.THROWASSERT(
-						"Unexpected nodeType = " + nodeType);
-				}
-		}
+            default:
+                if (SanityManager.DEBUG) {
+                    SanityManager.NOTREACHED();
+                }
+                op = null;
+                mNam = null;
+        }
         setOperator(op);
         setMethodName(mNam);
-		super.setNodeType(nodeType);
 	}
 
 	/**
@@ -203,4 +211,10 @@ public final class BinaryArithmeticOpera
 
 		return this;
 	}
+
+    @Override
+    boolean isSameNodeKind(ValueNode o) {
+        return super.isSameNodeKind(o) &&
+                ((BinaryArithmeticOperatorNode)o).kind == kind;
+    }
 }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryListOperatorNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryListOperatorNode.java?rev=1506827&r1=1506826&r2=1506827&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryListOperatorNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryListOperatorNode.java Thu Jul 25 07:12:46 2013
@@ -393,12 +393,12 @@ public abstract class BinaryListOperator
         /**
          * @inheritDoc
          */
-	protected boolean isEquivalent(ValueNode o) throws StandardException
+    boolean isEquivalent(ValueNode o) throws StandardException
 	{
-		if (!isSameNodeType(o))
-		{
+        if (! isSameNodeKind(o)) {
 			return false;
 		}
+
 		BinaryListOperatorNode other = (BinaryListOperatorNode)o;
 		if (!operator.equals(other.operator)
 				|| !leftOperand.isEquivalent(other.getLeftOperand())) 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryOperatorNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryOperatorNode.java?rev=1506827&r1=1506826&r2=1506827&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryOperatorNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryOperatorNode.java Thu Jul 25 07:12:46 2013
@@ -75,7 +75,6 @@ class BinaryOperatorNode extends Operato
 	String		leftInterfaceType;
 	String		rightInterfaceType;
 	String		resultInterfaceType;
-	int			operatorType;
 
 	// At the time of adding XML support, it was decided that
 	// we should avoid creating new OperatorNodes where possible.
@@ -85,8 +84,17 @@ class BinaryOperatorNode extends Operato
 	// XML-related or not) should follow this example when
 	// possible.
 
-    final static int XMLEXISTS_OP = 0;
-    final static int XMLQUERY_OP = 1;
+    // Allowed kinds
+    final static int K_XMLEXISTS = 0;
+    final static int K_XMLQUERY = 1;
+    final static int K_BASE = 2; // when BinaryOperatorNode is used
+                                 // as a base class
+    /**
+     * This class is used to hold logically different objects for
+     * space efficiency. {@code kind} represents the logical object
+     * type. See also {@link ValueNode#isSameNodeKind}.
+     */
+    final int kind;
 
 	// NOTE: in the following 4 arrays, order
 	// IS important.
@@ -116,6 +124,7 @@ class BinaryOperatorNode extends Operato
 
     BinaryOperatorNode(ContextManager cm) {
         super(cm);
+        kind = K_BASE;
     }
 
     BinaryOperatorNode(
@@ -133,7 +142,7 @@ class BinaryOperatorNode extends Operato
         this.methodName = methodName;
         this.leftInterfaceType = leftInterfaceType;
         this.rightInterfaceType = rightInterfaceType;
-        this.operatorType = -1;
+        this.kind = K_BASE;
     }
 
     BinaryOperatorNode(
@@ -148,37 +157,34 @@ class BinaryOperatorNode extends Operato
         this.rightOperand = rightOperand;
         this.leftInterfaceType = leftInterfaceType;
         this.rightInterfaceType = rightInterfaceType;
-		this.operatorType = -1;
+        this.kind = K_BASE;
 	}
 
 	/**
-     * Constructor for a BinaryOperatorNode
+     * Constructor for a concrete BinaryOperatorNode
 	 *
 	 * @param leftOperand	The left operand of the node
 	 * @param rightOperand	The right operand of the node
-	 * @param opType  An Integer holding the operatorType
-	 *  for this operator.
+     * @param kind          The kind of operator.
 	 */
     BinaryOperatorNode(
-            int nodeType,
             ValueNode leftOperand,
             ValueNode rightOperand,
-            int opType,
+            int kind,
             ContextManager cm)
 	{
         super(cm);
-        setNodeType(nodeType);
         this.leftOperand = leftOperand;
         this.rightOperand = rightOperand;
-        this.operatorType = opType;
-		this.operator = BinaryOperators[this.operatorType];
-		this.methodName = BinaryMethodNames[this.operatorType];
-		this.leftInterfaceType = BinaryArgTypes[this.operatorType][0];
-		this.rightInterfaceType = BinaryArgTypes[this.operatorType][1];
-		this.resultInterfaceType = BinaryResultTypes[this.operatorType];
+        this.kind = kind;
+        this.operator = BinaryOperators[this.kind];
+        this.methodName = BinaryMethodNames[this.kind];
+        this.leftInterfaceType = BinaryArgTypes[this.kind][0];
+        this.rightInterfaceType = BinaryArgTypes[this.kind][1];
+        this.resultInterfaceType = BinaryResultTypes[this.kind];
 	}
 
-	/**
+    /**
 	 * Convert this object to a String.  See comments in QueryTreeNode.java
 	 * for how this should be done for tree printing.
 	 *
@@ -207,7 +213,6 @@ class BinaryOperatorNode extends Operato
 	void setOperator(String operator)
 	{
 		this.operator = operator;
-		this.operatorType = -1;
 	}
 
 	/**
@@ -218,7 +223,6 @@ class BinaryOperatorNode extends Operato
 	void setMethodName(String methodName)
 	{
 		this.methodName = methodName;
-		this.operatorType = -1;
 	}
 
 	/**
@@ -230,7 +234,6 @@ class BinaryOperatorNode extends Operato
 	{
 		leftInterfaceType = iType;
 		rightInterfaceType = iType;
-		this.operatorType = -1;
 	}
 
 	/**
@@ -283,8 +286,10 @@ class BinaryOperatorNode extends Operato
 		rightOperand = rightOperand.bindExpression(fromList, subqueryList, 
             aggregates);
 
-		if ((operatorType == XMLEXISTS_OP) || (operatorType == XMLQUERY_OP))
+        if ((kind == K_XMLEXISTS) ||
+            (kind == K_XMLQUERY)) {
 			return bindXMLQuery();
+        }
 
 		/* Is there a ? parameter on the left? */
 		if (leftOperand.requiresTypeFromContext())
@@ -360,18 +365,18 @@ class BinaryOperatorNode extends Operato
         }
 
         // Set the result type of this operator.
-        if (operatorType == XMLEXISTS_OP) {
-        // For XMLEXISTS, the result type is always SQLBoolean.
-        // The "true" in the next line says that the result
-        // can be nullable--which it can be if evaluation of
-        // the expression returns a null (this is per SQL/XML
-        // spec, 8.4)
+        if (kind == K_XMLEXISTS) {
+            // For XMLEXISTS, the result type is always SQLBoolean.
+            // The "true" in the next line says that the result
+            // can be nullable--which it can be if evaluation of
+            // the expression returns a null (this is per SQL/XML
+            // spec, 8.4)
             setType(new DataTypeDescriptor(TypeId.BOOLEAN_ID, true));
         }
         else {
-        // The result of an XMLQUERY operator is always another
-        // XML data value, per SQL/XML spec 6.17: "...yielding a value
-        // X1 of an XML type."
+            // The result of an XMLQUERY operator is always another
+            // XML data value, per SQL/XML spec 6.17: "...yielding a value
+            // X1 of an XML type."
             setType(DataTypeDescriptor.getBuiltInDataTypeDescriptor(
                     Types.SQLXML));
         }
@@ -484,7 +489,7 @@ class BinaryOperatorNode extends Operato
 		// If we're dealing with XMLEXISTS or XMLQUERY, there is some
 		// additional work to be done.
 		boolean xmlGen =
-			(operatorType == XMLQUERY_OP) || (operatorType == XMLEXISTS_OP);
+           (kind == K_XMLQUERY) || (kind == K_XMLEXISTS);
 
 		/*
 		** The receiver is the operand with the higher type precedence.
@@ -502,7 +507,7 @@ class BinaryOperatorNode extends Operato
 			** a class, they can note that in the implementation
 			** of the node that uses the method.
 			*/
-		    receiverType = (operatorType == -1)
+            receiverType = (kind == K_BASE)
 				? getReceiverInterfaceName()
 				: leftInterfaceType;
 
@@ -537,7 +542,7 @@ class BinaryOperatorNode extends Operato
 			** a class, they can note that in the implementation
 			** of the node that uses the method.
 			*/
-		    receiverType = (operatorType == -1)
+            receiverType = (kind == K_BASE)
 				? getReceiverInterfaceName()
 				: rightInterfaceType;
 
@@ -579,7 +584,7 @@ class BinaryOperatorNode extends Operato
 		}
 
 		/* Figure out the result type name */
-		resultTypeName = (operatorType == -1)
+        resultTypeName = (kind == K_BASE)
 			? getTypeCompiler().interfaceName()
 			: resultInterfaceType;
 
@@ -818,18 +823,24 @@ class BinaryOperatorNode extends Operato
 		}
 	}
 
-        /**
-         * @inheritDoc
-         */
-        protected boolean isEquivalent(ValueNode o) throws StandardException
-        {
-        	if (!isSameNodeType(o))
-        	{
-        		return false;
-        	}
-        	BinaryOperatorNode other = (BinaryOperatorNode)o;
-        	return methodName.equals(other.methodName)
-        	       && leftOperand.isEquivalent(other.leftOperand)
-        	       && rightOperand.isEquivalent(other.rightOperand);
+    @Override
+    boolean isSameNodeKind(ValueNode o) {
+        return super.isSameNodeKind(o) &&
+                ((BinaryOperatorNode)o).kind == this.kind;
+    }
+
+    /**
+     * @inheritDoc
+     */
+    boolean isEquivalent(ValueNode o) throws StandardException
+    {
+        if (isSameNodeKind(o)) {
+            BinaryOperatorNode other = (BinaryOperatorNode)o;
+            return methodName.equals(other.methodName)
+                    && leftOperand.isEquivalent(other.leftOperand)
+                    && rightOperand.isEquivalent(other.rightOperand);
+        } else {
+            return false;
         }
+    }
 }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryRelationalOperatorNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryRelationalOperatorNode.java?rev=1506827&r1=1506826&r2=1506827&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryRelationalOperatorNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryRelationalOperatorNode.java Thu Jul 25 07:12:46 2013
@@ -27,7 +27,6 @@ import org.apache.derby.iapi.reference.C
 import org.apache.derby.iapi.services.compiler.MethodBuilder;
 import org.apache.derby.iapi.services.context.ContextManager;
 import org.apache.derby.iapi.services.sanity.SanityManager;
-import org.apache.derby.iapi.sql.compile.C_NodeTypes;
 import org.apache.derby.iapi.sql.compile.ExpressionClassBuilderInterface;
 import org.apache.derby.iapi.sql.compile.Optimizable;
 import org.apache.derby.iapi.sql.dictionary.ConglomerateDescriptor;
@@ -47,8 +46,23 @@ class BinaryRelationalOperatorNode
 	extends BinaryComparisonOperatorNode
 	implements RelationalOperator
 {
-	private int operatorType;
+    // Allowed kinds
+    final static int K_EQUALS = 0;
+    final static int K_GREATER_EQUALS = 1;
+    final static int K_GREATER_THAN = 2;
+    final static int K_LESS_EQUALS = 3;
+    final static int K_LESS_THAN = 4;
+    final static int K_NOT_EQUALS = 5;
+
+    /**
+     * This class is used to hold logically different objects for
+     * space efficiency. {@code kind} represents the logical object
+     * type. See also {@link ValueNode#isSameNodeKind}.
+     */
+    final int kind;
+
 	/* RelationalOperator Interface */
+    private int relOpType;
 
 	// Visitor for finding base tables beneath optimizables and column
 	// references.  Created once and re-used thereafter.
@@ -85,12 +99,14 @@ class BinaryRelationalOperatorNode
      *  be passed as the originalNode.getForQueryRewrite(). Examples of this
      *  can be found in Predicate.Java and PredicateList.java
      *
-     * @param leftOperand
-     * @param rightOperand
-     * @param forQueryRewrite
+     * @param kind            The kind of operator
+     * @param leftOperand     The left operand
+     * @param rightOperand    The right operand
+     * @param forQueryRewrite See method description
+     * @paran cm              The context manager
      */
     BinaryRelationalOperatorNode(
-            int nodeType,
+            int kind,
             ValueNode leftOperand,
             ValueNode rightOperand,
             boolean forQueryRewrite,
@@ -98,11 +114,12 @@ class BinaryRelationalOperatorNode
 	{
         super(leftOperand,
               rightOperand,
-              getOperatorName(nodeType),
-              getMethodName(nodeType),
+              getOperatorName(kind),
+              getMethodName(kind),
               forQueryRewrite,
               cm);
-        constructorMinion(nodeType);
+        this.kind = kind;
+        constructorMinion();
     }
 
     /**
@@ -122,7 +139,7 @@ class BinaryRelationalOperatorNode
      *  can be found in Predicate.Java and PredicateList.java
      */
     BinaryRelationalOperatorNode(
-            int nodeType,
+            int kind,
             ValueNode leftOperand,
             ValueNode rightOperand,
             InListOperatorNode inListOp,
@@ -131,43 +148,43 @@ class BinaryRelationalOperatorNode
     {
         super(leftOperand,
               rightOperand,
-              getOperatorName(nodeType),
-              getMethodName(nodeType),
+              getOperatorName(kind),
+              getMethodName(kind),
               forQueryRewrite,
               cm);
-        constructorMinion(nodeType);
+        this.kind = kind;
+        constructorMinion();
         this.inListProbeSource = inListOp;
     }
 
-    private void constructorMinion(int nodeType) {
-        this.operatorType = getOperatorType(nodeType);
-        setNodeType(nodeType);
+    private void constructorMinion() {
+        this.relOpType = getRelOpType(this.kind);
         btnVis = null;
     }
 
-    private static String getMethodName(int nodeType) {
+    private static String getMethodName(int kind) {
         String methodName = "";
-        switch (nodeType) {
-			case C_NodeTypes.BINARY_EQUALS_OPERATOR_NODE:
+        switch (kind) {
+        case K_EQUALS:
 				methodName = "equals";
 				break;
 
-			case C_NodeTypes.BINARY_GREATER_EQUALS_OPERATOR_NODE:
+        case K_GREATER_EQUALS:
 				methodName = "greaterOrEquals";
 				break;
 
-			case C_NodeTypes.BINARY_GREATER_THAN_OPERATOR_NODE:
+        case K_GREATER_THAN:
 				methodName = "greaterThan";
 				break;
 
-			case C_NodeTypes.BINARY_LESS_EQUALS_OPERATOR_NODE:
+        case K_LESS_EQUALS:
 				methodName = "lessOrEquals";
 				break;
 
-			case C_NodeTypes.BINARY_LESS_THAN_OPERATOR_NODE:
+        case K_LESS_THAN:
 				methodName = "lessThan";
 				break;
-			case C_NodeTypes.BINARY_NOT_EQUALS_OPERATOR_NODE:
+        case K_NOT_EQUALS:
 				methodName = "notEquals";
                 break;
 
@@ -175,37 +192,37 @@ class BinaryRelationalOperatorNode
                 if (SanityManager.DEBUG) {
                     SanityManager.THROWASSERT(
                             "Constructor for BinaryRelationalOperatorNode" +
-                            " called with wrong nodeType = " + nodeType);
+                            " called with wrong nodeType = " + kind);
                 }
                 break;
         }
         return methodName;
     }
 
-    private static String getOperatorName(int nodeType) {
+    private static String getOperatorName(int kind) {
         String operatorName = "";
 
-        switch (nodeType) {
-            case C_NodeTypes.BINARY_EQUALS_OPERATOR_NODE:
+        switch (kind) {
+        case K_EQUALS:
                 operatorName = "=";
                 break;
 
-            case C_NodeTypes.BINARY_GREATER_EQUALS_OPERATOR_NODE:
+        case K_GREATER_EQUALS:
                 operatorName = ">=";
                 break;
 
-            case C_NodeTypes.BINARY_GREATER_THAN_OPERATOR_NODE:
+        case K_GREATER_THAN:
                 operatorName = ">";
                 break;
 
-            case C_NodeTypes.BINARY_LESS_EQUALS_OPERATOR_NODE:
+        case K_LESS_EQUALS:
                 operatorName = "<=";
                 break;
 
-            case C_NodeTypes.BINARY_LESS_THAN_OPERATOR_NODE:
+        case K_LESS_THAN:
                 operatorName = "<";
                 break;
-            case C_NodeTypes.BINARY_NOT_EQUALS_OPERATOR_NODE:
+        case K_NOT_EQUALS:
 				operatorName = "<>";
 				break;
 
@@ -213,7 +230,7 @@ class BinaryRelationalOperatorNode
                 if (SanityManager.DEBUG) {
                     SanityManager.THROWASSERT(
                             "Constructor for BinaryRelationalOperatorNode " +
-                            "called with wrong nodeType = " + nodeType);
+                            "called with wrong nodeType = " + kind);
 				}
 			    break;
 		}
@@ -221,25 +238,25 @@ class BinaryRelationalOperatorNode
         return operatorName;
     }
 
-    private int getOperatorType(int nodeType) {
-        switch (nodeType) {
-            case C_NodeTypes.BINARY_EQUALS_OPERATOR_NODE:
+    private int getRelOpType(int op) {
+        switch (op) {
+        case K_EQUALS:
                 return RelationalOperator.EQUALS_RELOP;
-            case C_NodeTypes.BINARY_GREATER_EQUALS_OPERATOR_NODE:
+        case K_GREATER_EQUALS:
                 return RelationalOperator.GREATER_EQUALS_RELOP;
-            case C_NodeTypes.BINARY_GREATER_THAN_OPERATOR_NODE:
+        case K_GREATER_THAN:
                 return RelationalOperator.GREATER_THAN_RELOP;
-            case C_NodeTypes.BINARY_LESS_EQUALS_OPERATOR_NODE:
+        case K_LESS_EQUALS:
                 return RelationalOperator.LESS_EQUALS_RELOP;
-            case C_NodeTypes.BINARY_LESS_THAN_OPERATOR_NODE:
+        case K_LESS_THAN:
                 return RelationalOperator.LESS_THAN_RELOP;
-            case C_NodeTypes.BINARY_NOT_EQUALS_OPERATOR_NODE:
+        case K_NOT_EQUALS:
                 return RelationalOperator.NOT_EQUALS_RELOP;
             default:
                 if (SanityManager.DEBUG) {
                     SanityManager.THROWASSERT(
                             "Constructor for BinaryRelationalOperatorNode " +
-                            "called with wrong nodeType = " + getNodeType());
+                            "called with wrong operator type = " + kind);
                 }
                 return 0;
         }
@@ -1094,7 +1111,7 @@ class BinaryRelationalOperatorNode
 
             if (!leftVal.isNull() && !rightVal.isNull()) {
                 int comp = leftVal.compare(rightVal);
-                switch (operatorType) {
+                switch (relOpType) {
                     case EQUALS_RELOP:
                         return newBool(comp == 0);
                     case NOT_EQUALS_RELOP:
@@ -1145,35 +1162,36 @@ class BinaryRelationalOperatorNode
 	}
 
 	/* map current node to its negation */
-	private int getNegationNode()
+    private int getNegationNode()
 	{
-		switch (getNodeType())
+        switch (this.kind)
 		{
-			case C_NodeTypes.BINARY_EQUALS_OPERATOR_NODE:
-				return C_NodeTypes.BINARY_NOT_EQUALS_OPERATOR_NODE;
+            case K_EQUALS:
+                return K_NOT_EQUALS;
 
-			case C_NodeTypes.BINARY_GREATER_EQUALS_OPERATOR_NODE:
-				return C_NodeTypes.BINARY_LESS_THAN_OPERATOR_NODE;
+            case K_GREATER_EQUALS:
+                return K_LESS_THAN;
 
-			case C_NodeTypes.BINARY_GREATER_THAN_OPERATOR_NODE:
-				return C_NodeTypes.BINARY_LESS_EQUALS_OPERATOR_NODE;
+            case K_GREATER_THAN:
+                return K_LESS_EQUALS;
 
-			case C_NodeTypes.BINARY_LESS_THAN_OPERATOR_NODE:
-				return C_NodeTypes.BINARY_GREATER_EQUALS_OPERATOR_NODE;
+            case K_LESS_THAN:
+                return K_GREATER_EQUALS;
 				
-			case C_NodeTypes.BINARY_LESS_EQUALS_OPERATOR_NODE:
-				return C_NodeTypes.BINARY_GREATER_THAN_OPERATOR_NODE;
+            case K_LESS_EQUALS:
+                return K_GREATER_THAN;
 
-			case C_NodeTypes.BINARY_NOT_EQUALS_OPERATOR_NODE:				
-				return C_NodeTypes.BINARY_EQUALS_OPERATOR_NODE;
-		}
-		
-		if (SanityManager.DEBUG)
-		{
-			SanityManager.THROWASSERT("getNegationNode called with invalid nodeType: " + getNodeType());
-		}
+            case K_NOT_EQUALS:
+                return K_EQUALS;
 
-		return -1;
+            default:
+                if (SanityManager.DEBUG) {
+                    SanityManager.THROWASSERT(
+                        "getNegationNode called with invalid node type: " +
+                        kind);
+                }
+        }
+        return -1;
 	}	
 
     /**
@@ -1183,7 +1201,7 @@ class BinaryRelationalOperatorNode
      */
     BinaryOperatorNode getSwappedEquivalent() throws StandardException {
         BinaryOperatorNode newNode = new BinaryRelationalOperatorNode(
-            getNodeTypeForSwap(),
+            getKindForSwap(),
             rightOperand,
             leftOperand,
             false,
@@ -1203,24 +1221,24 @@ class BinaryRelationalOperatorNode
      * @return a node type that preserves the meaning of the expression if
      * the operands are swapped
      */
-    private int getNodeTypeForSwap() {
-        switch (getNodeType()) {
-            case C_NodeTypes.BINARY_EQUALS_OPERATOR_NODE:
-                return C_NodeTypes.BINARY_EQUALS_OPERATOR_NODE;
-            case C_NodeTypes.BINARY_GREATER_EQUALS_OPERATOR_NODE:
-                return C_NodeTypes.BINARY_LESS_EQUALS_OPERATOR_NODE;
-            case C_NodeTypes.BINARY_GREATER_THAN_OPERATOR_NODE:
-                return C_NodeTypes.BINARY_LESS_THAN_OPERATOR_NODE;
-            case C_NodeTypes.BINARY_LESS_THAN_OPERATOR_NODE:
-                return C_NodeTypes.BINARY_GREATER_THAN_OPERATOR_NODE;
-            case C_NodeTypes.BINARY_LESS_EQUALS_OPERATOR_NODE:
-                return C_NodeTypes.BINARY_GREATER_EQUALS_OPERATOR_NODE;
-            case C_NodeTypes.BINARY_NOT_EQUALS_OPERATOR_NODE:
-                return C_NodeTypes.BINARY_NOT_EQUALS_OPERATOR_NODE;
+    private int getKindForSwap() {
+        switch (this.kind) {
+            case K_EQUALS:
+                return K_EQUALS;
+            case K_GREATER_EQUALS:
+                return K_LESS_EQUALS;
+            case K_GREATER_THAN:
+                return K_LESS_THAN;
+            case K_LESS_THAN:
+                return K_GREATER_THAN;
+            case K_LESS_EQUALS:
+                return K_GREATER_EQUALS;
+            case K_NOT_EQUALS:
+                return K_NOT_EQUALS;
             default:
                 if (SanityManager.DEBUG) {
                     SanityManager.THROWASSERT(
-                            "Invalid nodeType: " + getNodeType());
+                            "Invalid operator type: " + kind);
                 }
                 return -1;
         }
@@ -1236,7 +1254,7 @@ class BinaryRelationalOperatorNode
 	 */
 	protected boolean usefulStartKey(boolean columnOnLeft)
 	{
-		switch (operatorType)
+        switch (relOpType)
 		{
 			case RelationalOperator.EQUALS_RELOP:
 				return true;
@@ -1260,7 +1278,7 @@ class BinaryRelationalOperatorNode
 	/** @see RelationalOperator#usefulStopKey */
 	protected boolean usefulStopKey(boolean columnOnLeft)
 	{
-		switch (operatorType)
+        switch (relOpType)
 		{
 			case RelationalOperator.EQUALS_RELOP:
 				return true;
@@ -1282,7 +1300,7 @@ class BinaryRelationalOperatorNode
 	/** @see RelationalOperator#getStartOperator */
 	public int getStartOperator(Optimizable optTable)
 	{
-		switch (operatorType)
+        switch (relOpType)
 		{
 			case RelationalOperator.EQUALS_RELOP:
 			case RelationalOperator.LESS_EQUALS_RELOP:
@@ -1304,7 +1322,7 @@ class BinaryRelationalOperatorNode
 	/** @see RelationalOperator#getStopOperator */
 	public int getStopOperator(Optimizable optTable)
 	{
-		switch (operatorType)
+        switch (relOpType)
 		{
 			case RelationalOperator.EQUALS_RELOP:
 			case RelationalOperator.GREATER_EQUALS_RELOP:
@@ -1326,7 +1344,7 @@ class BinaryRelationalOperatorNode
 	public void generateOperator(MethodBuilder mb,
 								 Optimizable optTable)
 	{
-		switch (operatorType)
+        switch (relOpType)
 		{
 			case RelationalOperator.EQUALS_RELOP:
 				mb.push(Orderable.ORDER_OP_EQUALS);
@@ -1352,7 +1370,7 @@ class BinaryRelationalOperatorNode
 	/** @see RelationalOperator#generateNegate */
 	public void generateNegate(MethodBuilder mb, Optimizable optTable)
 	{
-		switch (operatorType)
+        switch (relOpType)
 		{
 			case RelationalOperator.EQUALS_RELOP:
 				mb.push(false);
@@ -1374,7 +1392,7 @@ class BinaryRelationalOperatorNode
 	/** @see RelationalOperator#getOperator */
 	public int getOperator()
 	{
-		return operatorType;
+        return relOpType;
 	}
 
 	/** return the selectivity of this predicate.
@@ -1388,7 +1406,7 @@ class BinaryRelationalOperatorNode
 		if (retval >= 0.0d)
 			return retval;
 			
-		switch (operatorType)
+        switch (relOpType)
 		{
 			case RelationalOperator.EQUALS_RELOP:
 				return 0.1;
@@ -1411,7 +1429,7 @@ class BinaryRelationalOperatorNode
 	public RelationalOperator getTransitiveSearchClause(ColumnReference otherCR)
 		throws StandardException
 	{
-        return new BinaryRelationalOperatorNode(getNodeType(),
+        return new BinaryRelationalOperatorNode(kind,
                                                 otherCR,
                                                 rightOperand,
                                                 false,
@@ -1420,7 +1438,7 @@ class BinaryRelationalOperatorNode
 	
 	public boolean equalsComparisonWithConstantExpression(Optimizable optTable)
 	{
-		if (operatorType != EQUALS_RELOP)
+        if (relOpType != EQUALS_RELOP)
 			return false;
 
 		boolean retval = false;
@@ -1459,7 +1477,7 @@ class BinaryRelationalOperatorNode
 		 * operator.
 		 */
 		return !isInListProbeNode() &&
-			(operatorType == RelationalOperator.EQUALS_RELOP);
+            (relOpType == RelationalOperator.EQUALS_RELOP);
 	}
 
 	/**
@@ -1483,7 +1501,7 @@ class BinaryRelationalOperatorNode
 										   boolean isNullOkay)
 		throws StandardException
 	{
-		if (operatorType != EQUALS_RELOP)
+        if (relOpType != EQUALS_RELOP)
 			return false;
 
 		/* If this rel op is for a probe predicate then we do not treat
@@ -1539,7 +1557,7 @@ class BinaryRelationalOperatorNode
     @Override
     ValueNode genSQLJavaSQLTree() throws StandardException
 	{
-		if (operatorType == EQUALS_RELOP)
+        if (relOpType == EQUALS_RELOP)
 			return this;
 		
 		return super.genSQLJavaSQLTree();
@@ -1927,4 +1945,9 @@ class BinaryRelationalOperatorNode
 		ft.accept(btnVis);
 	}
 
+    @Override
+    boolean isSameNodeKind(ValueNode o) {
+        return super.isSameNodeKind(o) &&
+                ((BinaryRelationalOperatorNode)o).kind == kind;
+    }
 }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BitConstantNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BitConstantNode.java?rev=1506827&r1=1506826&r2=1506827&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BitConstantNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BitConstantNode.java Thu Jul 25 07:12:46 2013
@@ -26,7 +26,6 @@ import org.apache.derby.iapi.error.Stand
 import org.apache.derby.iapi.services.classfile.VMOpcode;
 import org.apache.derby.iapi.services.compiler.MethodBuilder;
 import org.apache.derby.iapi.services.context.ContextManager;
-import org.apache.derby.iapi.sql.compile.C_NodeTypes;
 import org.apache.derby.iapi.types.BitDataValue;
 import org.apache.derby.iapi.types.TypeId;
 import org.apache.derby.iapi.util.StringUtil;
@@ -42,7 +41,6 @@ class BitConstantNode extends ConstantNo
     BitConstantNode(TypeId t, ContextManager cm)
             throws StandardException {
         super(t, true, 0, cm);
-        setNodeType(C_NodeTypes.BIT_CONSTANT_NODE);
     }
 
 
@@ -55,7 +53,6 @@ class BitConstantNode extends ConstantNo
     BitConstantNode(String hexString, int bitLength, ContextManager cm)
             throws StandardException {
         super(TypeId.getBuiltInTypeId(Types.BINARY), false, bitLength, cm);
-        setNodeType(C_NodeTypes.BIT_CONSTANT_NODE);
         byte[] nv = StringUtil.fromHexString(hexString, 0, hexString.length());
         BitDataValue dvd = getDataValueFactory().getBitDataValue(nv);
 		dvd.setWidth(bitLength, 0, false);

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BooleanConstantNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BooleanConstantNode.java?rev=1506827&r1=1506826&r2=1506827&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BooleanConstantNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BooleanConstantNode.java Thu Jul 25 07:12:46 2013
@@ -28,7 +28,6 @@ import org.apache.derby.iapi.types.SQLBo
 import org.apache.derby.iapi.types.DataValueDescriptor;
 import org.apache.derby.iapi.types.TypeId;
 import org.apache.derby.iapi.services.context.ContextManager;
-import org.apache.derby.iapi.sql.compile.C_NodeTypes;
 
 public final class BooleanConstantNode extends ConstantNode
 {
@@ -49,14 +48,12 @@ public final class BooleanConstantNode e
 		*/
         // Fill in the type information in the parent ValueNode
         super(TypeId.BOOLEAN_ID, true, 1, cm);
-        setNodeType(C_NodeTypes.BOOLEAN_CONSTANT_NODE);
         setValue( null );
     }
 
     BooleanConstantNode(boolean value, ContextManager cm)
             throws StandardException {
         super(TypeId.BOOLEAN_ID, false, 1, cm);
-        setNodeType(C_NodeTypes.BOOLEAN_CONSTANT_NODE);
         super.setValue(new SQLBoolean(value));
         this.booleanValue = value;
     }
@@ -64,7 +61,6 @@ public final class BooleanConstantNode e
     BooleanConstantNode(TypeId t, ContextManager cm)
             throws StandardException {
         super(t, true, 0, cm);
-        setNodeType(C_NodeTypes.BOOLEAN_CONSTANT_NODE);
         this.unknownValue = true;
     }
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CallStatementNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CallStatementNode.java?rev=1506827&r1=1506826&r2=1506827&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CallStatementNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CallStatementNode.java Thu Jul 25 07:12:46 2013
@@ -31,7 +31,6 @@ import org.apache.derby.iapi.services.co
 import org.apache.derby.iapi.services.context.ContextManager;
 import org.apache.derby.iapi.services.sanity.SanityManager;
 import org.apache.derby.iapi.sql.ResultDescription;
-import org.apache.derby.iapi.sql.compile.C_NodeTypes;
 import org.apache.derby.iapi.sql.compile.CompilerContext;
 import org.apache.derby.iapi.sql.compile.Visitor;
 import org.apache.derby.iapi.sql.conn.Authorizer;
@@ -71,7 +70,6 @@ class CallStatementNode extends DMLState
     CallStatementNode(JavaToSQLValueNode methodCall, ContextManager cm)
 	{
         super(null, cm);
-        setNodeType(C_NodeTypes.CALL_STATEMENT_NODE);
         this.methodCall = methodCall;
 		this.methodCall.getJavaValueNode().markForCallStatement();
 	}

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CastNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CastNode.java?rev=1506827&r1=1506826&r2=1506827&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CastNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CastNode.java Thu Jul 25 07:12:46 2013
@@ -33,7 +33,6 @@ import org.apache.derby.iapi.services.co
 import org.apache.derby.iapi.services.compiler.MethodBuilder;
 import org.apache.derby.iapi.services.context.ContextManager;
 import org.apache.derby.iapi.services.sanity.SanityManager;
-import org.apache.derby.iapi.sql.compile.C_NodeTypes;
 import org.apache.derby.iapi.sql.compile.TypeCompiler;
 import org.apache.derby.iapi.sql.compile.Visitor;
 import org.apache.derby.iapi.types.DataTypeDescriptor;
@@ -99,7 +98,6 @@ class CastNode extends ValueNode
              DataTypeDescriptor castTarget,
              ContextManager cm) throws StandardException {
         super(cm);
-        setNodeType(C_NodeTypes.CAST_NODE);
         this.castOperand = castOperand;
         setType(castTarget);
 	}
@@ -120,7 +118,6 @@ class CastNode extends ValueNode
              int charLength,
              ContextManager cm) throws StandardException {
         super(cm);
-        setNodeType(C_NodeTypes.CAST_NODE);
         this.castOperand = castOperand;
         int charLen = charLength;
         targetCharType = charType;
@@ -1024,14 +1021,14 @@ class CastNode extends ValueNode
 	 * {@inheritDoc}
 	 * @throws StandardException 
 	 */
-	protected boolean isEquivalent(ValueNode o) throws StandardException
+    boolean isEquivalent(ValueNode o) throws StandardException
 	{
-		if (isSameNodeType(o)) 
-		{
+        if (isSameNodeKind(o)) {
 			CastNode other = (CastNode)o;
 			return getTypeServices().equals(other.getTypeServices())
 				&& castOperand.isEquivalent(other.castOperand);
 		}
+
 		return false;
 	}
 }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CharConstantNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CharConstantNode.java?rev=1506827&r1=1506826&r2=1506827&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CharConstantNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CharConstantNode.java Thu Jul 25 07:12:46 2013
@@ -26,12 +26,25 @@ import org.apache.derby.iapi.error.Stand
 import org.apache.derby.iapi.reference.SQLState;
 import org.apache.derby.iapi.services.compiler.MethodBuilder;
 import org.apache.derby.iapi.services.context.ContextManager;
-import org.apache.derby.iapi.sql.compile.C_NodeTypes;
 import org.apache.derby.iapi.types.StringDataValue;
 import org.apache.derby.iapi.types.TypeId;
 
 public final class CharConstantNode extends ConstantNode
 {
+
+    // Allowed kinds
+    final static int K_CHAR = 0;
+    final static int K_VARCHAR = 1;
+    final static int K_LONGVARCHAR = 2;
+    final static int K_CLOB = 3;
+
+    /**
+     * This class is used to hold logically different objects for
+     * space efficiency. {@code kind} represents the logical object
+     * type. See also {@link ValueNode#isSameNodeKind}.
+     */
+    final int kind;
+
     CharConstantNode(String value, ContextManager cm)
             throws StandardException {
         super(TypeId.CHAR_ID,
@@ -40,25 +53,25 @@ public final class CharConstantNode exte
               cm);
 
         setValue(getDataValueFactory().getCharDataValue(value));
-        setNodeType(C_NodeTypes.CHAR_CONSTANT_NODE);
+        kind = K_CHAR;
     }
 
     CharConstantNode(TypeId t, ContextManager cm)
             throws StandardException {
         super(t, true, 0, cm);
-        setNodeType(C_NodeTypes.CHAR_CONSTANT_NODE);
+        kind = K_CHAR;
     }
 
     /**
-     * @param type VARCHAR_CONSTANT_NODE or LONGVARCHAR_CONSTANT_NODE
-     * @param t typeId
-     * @param cm context manager
+     * @param kind The node kind
+     * @param t    The type id
+     * @param cm   The context manager
      * @throws StandardException
      */
-    CharConstantNode(int type, TypeId t, ContextManager cm)
+    CharConstantNode(int kind, TypeId t, ContextManager cm)
             throws StandardException {
         super(t, true, 0, cm);
-        setNodeType(type);
+        this.kind = kind;
     }
 
     /**
@@ -77,7 +90,7 @@ public final class CharConstantNode exte
               newLength,
               cm);
 
-        setNodeType(C_NodeTypes.CHAR_CONSTANT_NODE);
+        kind = K_CHAR;
 
         if (newValue.length() > newLength) {
            throw StandardException.newException(
@@ -179,4 +192,8 @@ public final class CharConstantNode exte
 		// "#getString()"
 		mb.push(getString());
 	}
-}
+
+    @Override
+    boolean isSameNodeKind(ValueNode o) {
+        return super.isSameNodeKind(o) && ((CharConstantNode)o).kind == kind;
+    }}

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CoalesceFunctionNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CoalesceFunctionNode.java?rev=1506827&r1=1506826&r2=1506827&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CoalesceFunctionNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CoalesceFunctionNode.java Thu Jul 25 07:12:46 2013
@@ -31,7 +31,6 @@ import org.apache.derby.iapi.services.co
 import org.apache.derby.iapi.services.compiler.MethodBuilder;
 import org.apache.derby.iapi.services.context.ContextManager;
 import org.apache.derby.iapi.services.sanity.SanityManager;
-import org.apache.derby.iapi.sql.compile.C_NodeTypes;
 import org.apache.derby.iapi.sql.compile.Visitor;
 import org.apache.derby.iapi.util.JBitSet;
 
@@ -121,7 +120,6 @@ class CoalesceFunctionNode extends Value
         super(cm);
         this.functionName = functionName;
         this.argumentsList = argumentsList;
-        setNodeType(C_NodeTypes.COALESCE_FUNCTION_NODE);
 	}
 
 	/**
@@ -356,10 +354,9 @@ class CoalesceFunctionNode extends Value
 	/**
 	 * {@inheritDoc}
 	 */
-	protected boolean isEquivalent(ValueNode o) throws StandardException
+    boolean isEquivalent(ValueNode o) throws StandardException
 	{
-		if (!isSameNodeType(o))
-		{
+        if (! isSameNodeKind(o)) {
 			return false;
 		}
 		

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ColumnDefinitionNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ColumnDefinitionNode.java?rev=1506827&r1=1506826&r2=1506827&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ColumnDefinitionNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ColumnDefinitionNode.java Thu Jul 25 07:12:46 2013
@@ -33,7 +33,6 @@ import org.apache.derby.iapi.services.co
 import org.apache.derby.iapi.services.io.StoredFormatIds;
 import org.apache.derby.iapi.services.loader.ClassInspector;
 import org.apache.derby.iapi.services.sanity.SanityManager;
-import org.apache.derby.iapi.sql.compile.C_NodeTypes;
 import org.apache.derby.iapi.sql.compile.CompilerContext;
 import org.apache.derby.iapi.sql.depend.ProviderList;
 import org.apache.derby.iapi.sql.dictionary.DataDictionary;
@@ -108,9 +107,9 @@ public class ColumnDefinitionNode extend
 		throws StandardException
 	{
         super(name, cm);
-        setNodeType(C_NodeTypes.COLUMN_DEFINITION_NODE);
         this.type = dataTypeServices;
-		if (defaultNode instanceof UntypedNullConstantNode)
+
+        if (defaultNode instanceof UntypedNullConstantNode)
 		{
 			/* No DTS yet for MODIFY DEFAULT */
 			if (dataTypeServices != null)
@@ -730,29 +729,26 @@ public class ColumnDefinitionNode extend
 				(colType == StoredFormatIds.LONGVARCHAR_TYPE_ID));
 
 			if (defaultNode instanceof SpecialFunctionNode) {
-
-				switch (defaultNode.getNodeType())
-				{
-				case C_NodeTypes.USER_NODE:
-				case C_NodeTypes.CURRENT_USER_NODE:
-				case C_NodeTypes.CURRENT_ROLE_NODE:
-				case C_NodeTypes.SESSION_USER_NODE:
-				case C_NodeTypes.SYSTEM_USER_NODE:
-				// DB2 enforces min length of 8.
-				// Note also: any size under 30 gives a warning in DB2.
-					return (charCol && (columnDesc.getMaximumWidth() >=
-						Limits.DB2_MIN_COL_LENGTH_FOR_CURRENT_USER));
-
-				case C_NodeTypes.CURRENT_SCHEMA_NODE:
-				// DB2 enforces min length of 128.
-					return (charCol && (columnDesc.getMaximumWidth() >=
-						Limits.DB2_MIN_COL_LENGTH_FOR_CURRENT_SCHEMA));
-				default:
-					// else, function not allowed.
-					return false;
-				}
+                switch (((SpecialFunctionNode)defaultNode).kind) {
+                    case SpecialFunctionNode.K_USER:
+                    case SpecialFunctionNode.K_CURRENT_USER:
+                    case SpecialFunctionNode.K_CURRENT_ROLE:
+                    case SpecialFunctionNode.K_SESSION_USER:
+                    case SpecialFunctionNode.K_SYSTEM_USER:
+                        // DB2 enforces min length of 8.
+                        // Note also: any size under 30 gives a warning in DB2.
+                        return (charCol && (columnDesc.getMaximumWidth() >=
+                                Limits.DB2_MIN_COL_LENGTH_FOR_CURRENT_USER));
+
+                    case SpecialFunctionNode.K_CURRENT_SCHEMA:
+                        // DB2 enforces min length of 128.
+                        return (charCol && (columnDesc.getMaximumWidth() >=
+                                Limits.DB2_MIN_COL_LENGTH_FOR_CURRENT_SCHEMA));
+                    default:
+                        // else, function not allowed.
+                        return false;
+                }
 			}
-
 		}
 
 		switch (colType) {

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ColumnReference.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ColumnReference.java?rev=1506827&r1=1506826&r2=1506827&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ColumnReference.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ColumnReference.java Thu Jul 25 07:12:46 2013
@@ -27,7 +27,6 @@ import org.apache.derby.iapi.reference.S
 import org.apache.derby.iapi.services.compiler.MethodBuilder;
 import org.apache.derby.iapi.services.context.ContextManager;
 import org.apache.derby.iapi.services.sanity.SanityManager;
-import org.apache.derby.iapi.sql.compile.C_NodeTypes;
 import org.apache.derby.iapi.store.access.Qualifier;
 import org.apache.derby.iapi.types.DataTypeDescriptor;
 import org.apache.derby.iapi.util.JBitSet;
@@ -123,7 +122,6 @@ public class ColumnReference extends Val
                     int            tokEndOffset,
                     ContextManager cm)  {
         super(cm);
-        setNodeType(C_NodeTypes.COLUMN_REFERENCE);
         this.columnName = columnName;
         this.tableName = tableName;
         this.setBeginOffset(tokBeginOffset);
@@ -143,7 +141,6 @@ public class ColumnReference extends Val
                     TableName      tableName,
                     ContextManager cm) {
         super(cm);
-        setNodeType(C_NodeTypes.COLUMN_REFERENCE);
         this.columnName = columnName;
         this.tableName = tableName;
 		tableNumber = -1;
@@ -593,11 +590,11 @@ public class ColumnReference extends Val
 
         trueNode = new BooleanConstantNode(true, getContextManager());
         equalsNode = new BinaryRelationalOperatorNode(
-										C_NodeTypes.BINARY_EQUALS_OPERATOR_NODE,
-										this,
-										trueNode,
-                                        false,
-										getContextManager());
+                BinaryRelationalOperatorNode.K_EQUALS,
+                this,
+                trueNode,
+                false,
+                getContextManager());
 		/* Set type info for the operator node */
 		equalsNode.bindComparisonOperator();
 
@@ -1192,11 +1189,12 @@ public class ColumnReference extends Val
 		return null;
 	}
 	
-	protected boolean isEquivalent(ValueNode o) throws StandardException
+    boolean isEquivalent(ValueNode o) throws StandardException
 	{
-		if (!isSameNodeType(o)) {
+        if (! isSameNodeKind(o)) {
 			return false;
 		}
+
 		ColumnReference other = (ColumnReference)o;
 		return (tableNumber == other.tableNumber 
 				&& columnName.equals(other.getColumnName()));

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ConcatenationOperatorNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ConcatenationOperatorNode.java?rev=1506827&r1=1506826&r2=1506827&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ConcatenationOperatorNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ConcatenationOperatorNode.java Thu Jul 25 07:12:46 2013
@@ -29,7 +29,6 @@ import org.apache.derby.iapi.reference.L
 import org.apache.derby.iapi.reference.SQLState;
 import org.apache.derby.iapi.services.context.ContextManager;
 import org.apache.derby.iapi.services.sanity.SanityManager;
-import org.apache.derby.iapi.sql.compile.C_NodeTypes;
 import org.apache.derby.iapi.sql.compile.TypeCompiler;
 import org.apache.derby.iapi.types.DataTypeDescriptor;
 import org.apache.derby.iapi.types.StringDataValue;
@@ -62,7 +61,6 @@ class ConcatenationOperatorNode extends 
               ClassName.ConcatableDataValue,
               ClassName.ConcatableDataValue,
               cm);
-        setNodeType(C_NodeTypes.CONCATENATION_OPERATOR_NODE);
 	}
 
     /**

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=1506827&r1=1506826&r2=1506827&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 Thu Jul 25 07:12:46 2013
@@ -30,7 +30,6 @@ import org.apache.derby.iapi.services.co
 import org.apache.derby.iapi.services.context.ContextManager;
 import org.apache.derby.iapi.services.loader.ClassInspector;
 import org.apache.derby.iapi.services.sanity.SanityManager;
-import org.apache.derby.iapi.sql.compile.C_NodeTypes;
 import org.apache.derby.iapi.sql.compile.CompilerContext;
 import org.apache.derby.iapi.sql.compile.Visitor;
 import org.apache.derby.iapi.types.DataTypeDescriptor;
@@ -68,7 +67,6 @@ class ConditionalNode extends ValueNode
         this.testCondition = testCondition;
         this.thenElseList = thenElseList;
         this.thisIsNullIfNode = thisIsNullIfNode;
-        setNodeType(C_NodeTypes.CONDITIONAL_NODE);
 	}
 
 	/**
@@ -105,7 +103,7 @@ class ConditionalNode extends ValueNode
 	 * @return 		True if this node is a CastNode, false otherwise.
 	 */
 	private boolean isCastNode(ValueNode node) {
-        return node.getNodeType() == C_NodeTypes.CAST_NODE;
+        return node instanceof CastNode;
 	}
 
 	/**
@@ -146,7 +144,7 @@ class ConditionalNode extends ValueNode
 	 * @return        True if this node is a CondtionalNode, false otherwise.
 	 */
 	private boolean isConditionalNode(ValueNode node) {
-        return node.getNodeType() == C_NodeTypes.CONDITIONAL_NODE;
+        return node instanceof ConditionalNode;
 	}
 
 	/**
@@ -730,14 +728,14 @@ class ConditionalNode extends ValueNode
 	/**
 	 * {@inheritDoc}
 	 */
-	protected boolean isEquivalent(ValueNode o) throws StandardException
+    boolean isEquivalent(ValueNode o) throws StandardException
 	{
-		if (isSameNodeType(o)) 
-		{
+        if (isSameNodeKind(o)) {
 			ConditionalNode other = (ConditionalNode)o;
             return testCondition.isEquivalent(other.testCondition) &&
                     thenElseList.isEquivalent(other.thenElseList);
 		}
+
 		return false;
 	}
 }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ConstantNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ConstantNode.java?rev=1506827&r1=1506826&r2=1506827&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ConstantNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ConstantNode.java Thu Jul 25 07:12:46 2013
@@ -255,9 +255,9 @@ abstract class ConstantNode extends Valu
 		return Qualifier.CONSTANT;
 	}
         
-	protected boolean isEquivalent(ValueNode o) throws StandardException
+    boolean isEquivalent(ValueNode o) throws StandardException
 	{
-		if (isSameNodeType(o)) {
+        if (isSameNodeKind(o)) {
 			ConstantNode other = (ConstantNode)o;
 			
 			// value can be null which represents a SQL NULL value.
@@ -265,6 +265,7 @@ abstract class ConstantNode extends Valu
 					 (other.getValue() != null && 
 							 other.getValue().compare(getValue()) == 0) );
 		}
+
 		return false;
 	}
 }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ConstraintDefinitionNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ConstraintDefinitionNode.java?rev=1506827&r1=1506826&r2=1506827&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ConstraintDefinitionNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ConstraintDefinitionNode.java Thu Jul 25 07:12:46 2013
@@ -29,7 +29,6 @@ import org.apache.derby.iapi.services.co
 import org.apache.derby.iapi.services.monitor.Monitor;
 import org.apache.derby.iapi.services.sanity.SanityManager;
 import org.apache.derby.iapi.services.uuid.UUIDFactory;
-import org.apache.derby.iapi.sql.compile.C_NodeTypes;
 import org.apache.derby.iapi.sql.depend.ProviderList;
 import org.apache.derby.iapi.sql.dictionary.DataDictionary;
 
@@ -72,7 +71,6 @@ class ConstraintDefinitionNode extends T
 		 * since constraintName may be null.
 		 */
         super(null, cm);
-        setNodeType(C_NodeTypes.CONSTRAINT_DEFINITION_NODE);
 
         this.constraintName = constraintName;
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateAliasNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateAliasNode.java?rev=1506827&r1=1506826&r2=1506827&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateAliasNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateAliasNode.java Thu Jul 25 07:12:46 2013
@@ -33,7 +33,6 @@ import org.apache.derby.iapi.error.Stand
 import org.apache.derby.iapi.reference.SQLState;
 import org.apache.derby.iapi.services.context.ContextManager;
 import org.apache.derby.iapi.services.sanity.SanityManager;
-import org.apache.derby.iapi.sql.compile.C_NodeTypes;
 import org.apache.derby.iapi.sql.dictionary.AliasDescriptor;
 import org.apache.derby.iapi.sql.dictionary.DataDictionary;
 import org.apache.derby.iapi.sql.dictionary.SchemaDescriptor;
@@ -140,7 +139,6 @@ class CreateAliasNode extends DDLStateme
 		throws StandardException
 	{		
         super(aliasName, cm);
-        setNodeType(C_NodeTypes.CREATE_ALIAS_NODE);
         this.aliasType = aliasType;
 
 		switch (this.aliasType)

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=1506827&r1=1506826&r2=1506827&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 Thu Jul 25 07:12:46 2013
@@ -31,7 +31,6 @@ import org.apache.derby.iapi.reference.S
 import org.apache.derby.iapi.services.context.ContextManager;
 import org.apache.derby.iapi.services.property.PropertyUtil;
 import org.apache.derby.iapi.services.sanity.SanityManager;
-import org.apache.derby.iapi.sql.compile.C_NodeTypes;
 import org.apache.derby.iapi.sql.dictionary.ColumnDescriptor;
 import org.apache.derby.iapi.sql.dictionary.SchemaDescriptor;
 import org.apache.derby.iapi.sql.dictionary.TableDescriptor;
@@ -86,7 +85,6 @@ class CreateIndexNode extends DDLStateme
         this.tableName = tableName;
         this.columnNameList = columnNameList;
         this.properties = properties;
-        setNodeType(C_NodeTypes.CREATE_INDEX_NODE);
 	}
 
 	/**

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateRoleNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateRoleNode.java?rev=1506827&r1=1506826&r2=1506827&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateRoleNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateRoleNode.java Thu Jul 25 07:12:46 2013
@@ -24,7 +24,6 @@ package org.apache.derby.impl.sql.compil
 import org.apache.derby.iapi.error.StandardException;
 import org.apache.derby.iapi.services.context.ContextManager;
 import org.apache.derby.iapi.services.sanity.SanityManager;
-import org.apache.derby.iapi.sql.compile.C_NodeTypes;
 import org.apache.derby.iapi.sql.compile.CompilerContext;
 import org.apache.derby.iapi.sql.conn.Authorizer;
 import org.apache.derby.iapi.sql.execute.ConstantAction;
@@ -50,7 +49,6 @@ class CreateRoleNode extends DDLStatemen
     {
         super(null, cm);
         this.name = roleName;
-        setNodeType((C_NodeTypes.CREATE_ROLE_NODE));
     }
 
     /**

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateSchemaNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateSchemaNode.java?rev=1506827&r1=1506826&r2=1506827&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateSchemaNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateSchemaNode.java Thu Jul 25 07:12:46 2013
@@ -24,7 +24,6 @@ package	org.apache.derby.impl.sql.compil
 import org.apache.derby.iapi.error.StandardException;
 import org.apache.derby.iapi.services.context.ContextManager;
 import org.apache.derby.iapi.services.sanity.SanityManager;
-import org.apache.derby.iapi.sql.compile.C_NodeTypes;
 import org.apache.derby.iapi.sql.compile.CompilerContext;
 import org.apache.derby.iapi.sql.conn.Authorizer;
 import org.apache.derby.iapi.sql.execute.ConstantAction;
@@ -62,7 +61,6 @@ class CreateSchemaNode extends DDLStatem
         super(null, cm);
         this.name = schemaName;
         this.aid = aid;
-        setNodeType(C_NodeTypes.CREATE_SCHEMA_NODE);
 	}
 
 	/**



Mime
View raw message