db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bakk...@apache.org
Subject svn commit: r329187 [8/66] - in /db/derby/code/trunk: ./ frameworks/NetworkServer/ frameworks/NetworkServer/bin/ frameworks/embedded/bin/ java/build/ java/build/org/apache/derbyBuild/ java/build/org/apache/derbyBuild/eclipse/ java/build/org/apache/derb...
Date Fri, 28 Oct 2005 12:52:21 GMT
Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SetOperatorNode.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SetOperatorNode.java?rev=329187&r1=329186&r2=329187&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SetOperatorNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SetOperatorNode.java Fri Oct 28 04:51:50 2005
@@ -1,648 +1,648 @@
-/*
-
-   Derby - Class org.apache.derby.impl.sql.compile.SetOperatorNode
-
-   Copyright 2004 The Apache Software Foundation or its licensors, as applicable.
-
-   Licensed 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.impl.sql.compile;
-
-import org.apache.derby.iapi.services.sanity.SanityManager;
-
-import org.apache.derby.iapi.error.StandardException;
-
-import org.apache.derby.iapi.sql.compile.C_NodeTypes;
-
-import org.apache.derby.iapi.sql.dictionary.DataDictionary;
-import org.apache.derby.iapi.sql.dictionary.TableDescriptor;
-
-import org.apache.derby.iapi.reference.SQLState;
-import org.apache.derby.iapi.types.DataTypeDescriptor;
-
-import org.apache.derby.iapi.util.JBitSet;
-
-/**
- * A SetOperatorNode represents a UNION, INTERSECT, or EXCEPT in a DML statement. Binding and optimization
- * preprocessing is the same for all of these operations, so they share bind methods in this abstract class.
- *
- * The class contains a boolean telling whether the operation should eliminate
- * duplicate rows.
- *
- * @author Jeff Lichtman
- */
-
-public abstract class SetOperatorNode extends TableOperatorNode
-{
-	/**
-	** Tells whether to eliminate duplicate rows.  all == TRUE means do
-	** not eliminate duplicates, all == FALSE means eliminate duplicates.
-	*/
-	boolean			all;
-
-	OrderByList orderByList;
-
-
-	/**
-	 * Initializer for a SetOperatorNode.
-	 *
-	 * @param leftResult		The ResultSetNode on the left side of this union
-	 * @param rightResult		The ResultSetNode on the right side of this union
-	 * @param all				Whether or not this is an ALL.
-	 * @param tableProperties	Properties list associated with the table
-	 *
-	 * @exception StandardException		Thrown on error
-	 */
-
-	public void init(
-					Object leftResult,
-					Object rightResult,
-					Object all,
-					Object tableProperties)
-			throws StandardException
-	{
-		super.init(leftResult, rightResult, tableProperties);
-
-		this.all = ((Boolean) all).booleanValue();
-
-		/* resultColumns cannot be null, so we make a copy of the left RCL
-		 * for now.  At bind() time, we need to recopy the list because there
-		 * may have been a "*" in the list.  (We will set the names and
-		 * column types at that time, as expected.)
-		 */
-		resultColumns = leftResultSet.getResultColumns().copyListAndObjects();
-	}
-
-	/**
-	 * Convert this object to a String.  See comments in QueryTreeNode.java
-	 * for how this should be done for tree printing.
-	 *
-	 * @return	This object as a String
-	 */
-
-	public String toString()
-	{
-		if (SanityManager.DEBUG)
-		{
-			return 	"all: " + all + "\n" +
-				"orderByList: " + 
-				(orderByList != null ? orderByList.toString() : "null") + "\n" +
-				super.toString();
-		}
-		else
-		{
-			return "";
-		}
-	}
-
-	/**
-	 * Bind the result columns of this ResultSetNode when there is no
-	 * base table to bind them to.  This is useful for SELECT statements,
-	 * where the result columns get their types from the expressions that
-	 * live under them.
-	 *
-	 * @param fromListParam		FromList to use/append to.
-	 *
-	 * @return	Nothing
-	 *
-	 * @exception StandardException		Thrown on error
-	 */
-	public void bindResultColumns(FromList fromListParam)
-					throws StandardException
-	{
-		super.bindResultColumns(fromListParam);
-
-		/* Now we build our RCL */
-		buildRCL();
-	}
-
-	/**
-	 * Bind the result columns for this ResultSetNode to a base table.
-	 * This is useful for INSERT and UPDATE statements, where the
-	 * result columns get their types from the table being updated or
-	 * inserted into.
-	 * If a result column list is specified, then the verification that the 
-	 * result column list does not contain any duplicates will be done when
-	 * binding them by name.
-	 *
-	 * @param targetTableDescriptor	The TableDescriptor for the table being
-	 *				updated or inserted into
-	 * @param targetColumnList	For INSERT statements, the user
-	 *					does not have to supply column
-	 *					names (for example, "insert into t
-	 *					values (1,2,3)".  When this
-	 *					parameter is null, it means that
-	 *					the user did not supply column
-	 *					names, and so the binding should
-	 *					be done based on order.  When it
-	 *					is not null, it means do the binding
-	 *					by name, not position.
-	 * @param statement			Calling DMLStatementNode (Insert or Update)
-	 * @param fromListParam		FromList to use/append to.
-	 *
-	 * @return	Nothing
-	 *
-	 * @exception StandardException		Thrown on error
-	 */
-
-	public void bindResultColumns(TableDescriptor targetTableDescriptor,
-					FromVTI targetVTI,
-					ResultColumnList targetColumnList,
-					DMLStatementNode statement,
-					FromList fromListParam)
-				throws StandardException
-	{
-		super.bindResultColumns(targetTableDescriptor,
-								targetVTI,
-								targetColumnList, statement,
-								fromListParam);
-
-		/* Now we build our RCL */
-		buildRCL();
-	}
-
-	/**
-	 * Build the RCL for this node.  We propagate the RCL up from the
-	 * left child to form this node's RCL.
-	 *
-	 * @return	Nothing
-	 *
-	 * @exception StandardException		Thrown on error
-	 */
-
-	private void buildRCL() throws StandardException
-	{
-		/* Verify that both sides of the union have the same # of columns in their
-		 * RCL.
-		 */
-		if (leftResultSet.getResultColumns().size() !=
-			rightResultSet.getResultColumns().size())
-		{
-			throw StandardException.newException(SQLState.LANG_UNION_UNMATCHED_COLUMNS,
-                                                 getOperatorName());
-		}
-
-		/* We need to recreate resultColumns for this node, since there
-		 * may have been 1 or more *'s in the left's SELECT list.
-		 */
-		resultColumns = leftResultSet.getResultColumns().copyListAndObjects();
-
-		/* Create new expressions with the dominant types after verifying
-		 * union compatibility between left and right sides.
-		 */
-		resultColumns.setUnionResultExpression(rightResultSet.getResultColumns(), tableNumber, level, getOperatorName());
-	}
-
-	/**
-	 * Bind the result columns of a table constructor to the types in the
-	 * given ResultColumnList.  Use when inserting from a table constructor,
-	 * and there are nulls in the values clauses.
-	 *
-	 * @param rcl	The ResultColumnList with the types to bind to
-	 *
-	 * @exception StandardException		Thrown on error.
-	 */
-	public void bindUntypedNullsToResultColumns(ResultColumnList rcl)
-				throws StandardException
-	{
-		/*
-		** If the RCL from the parent is null, then
-		** the types are coming from the union itself.
-		** So we have to cross check the two child
-		** rcls.
-		*/
-		if (rcl == null)
-		{
-			ResultColumnList lrcl = rightResultSet.getResultColumns();
-			ResultColumnList rrcl = leftResultSet.getResultColumns();
-
-			leftResultSet.bindUntypedNullsToResultColumns(rrcl);
-			rightResultSet.bindUntypedNullsToResultColumns(lrcl);
-		}
-		else	
-		{
-			leftResultSet.bindUntypedNullsToResultColumns(rcl);
-			rightResultSet.bindUntypedNullsToResultColumns(rcl);
-		}			
-	}
-
-	/**
-	 * Get the parameter types from the given RowResultSetNode into the
-	 * given array of types.  If an array position is already filled in,
-	 * don't clobber it.
-	 *
-	 * @param types	The array of types to fill in
-	 * @param rrsn	The RowResultSetNode from which to take the param types
-	 *
-	 * @return	The number of new types found in the RowResultSetNode
-	 */
-	int getParamColumnTypes(DataTypeDescriptor[] types, RowResultSetNode rrsn)
-	{
-		int	numTypes = 0;
-
-		/* Look for columns where we have not found a non-? yet. */
-		for (int i = 0; i < types.length; i++)
-		{
-			if (types[i] == null)
-			{
-				ResultColumn rc =
-					(ResultColumn) rrsn.getResultColumns().elementAt(i);
-				if ( ! (rc.getExpression().isParameterNode()))
-				{
-					types[i] = rc.getExpressionType();
-					numTypes++;
-				}
-			}
-		}
-
-		return numTypes;
-	}
-
-	/**
-	 * Set the type of each ? parameter in the given RowResultSetNode
-	 * according to its ordinal position in the given array of types.
-	 *
-	 * @param types	An array of types containing the proper type for each
-	 *				? parameter, by ordinal position.
-	 * @param rrsn	A RowResultSetNode that could contain ? parameters whose
-	 *				types need to be set.
-	 *
-	 * @exception StandardException		Thrown on error
-	 */
-	void setParamColumnTypes(DataTypeDescriptor[] types, RowResultSetNode rrsn)
-					throws StandardException
-	{
-		/*
-		** Look for ? parameters in the result column list
-		** of each RowResultSetNode
-		*/
-		ResultColumnList rrcl = rrsn.getResultColumns();
-		int rrclSize = rrcl.size();
-		for (int index = 0; index < rrclSize; index++)
-		{
-			ResultColumn	rc = (ResultColumn) rrcl.elementAt(index);
-
-			if (rc.getExpression().isParameterNode())
-			{
-				/*
-				** We found a ? - set its type to the type from the
-				** type array.
-				*/
-				((ParameterNode) rc.getExpression()).setDescriptor(
-											types[index]);
-			}
-		}
-	}
-
-	/**
-	 * Bind the expressions in the target list.  This means binding the
-	 * sub-expressions, as well as figuring out what the return type is
-	 * for each expression.  This is useful for EXISTS subqueries, where we
-	 * need to validate the target list before blowing it away and replacing
-	 * it with a SELECT true.
-	 *
-	 * @return	Nothing
-	 *
-	 * @exception StandardException		Thrown on error
-	 */
-
-	public void bindTargetExpressions(FromList fromListParam)
-					throws StandardException
-	{
-		leftResultSet.bindTargetExpressions(fromListParam);
-		rightResultSet.bindTargetExpressions(fromListParam);
-	}
-
-	/**
-	 * Push the order by list down from the cursor node
-	 * into its child result set so that the optimizer
-	 * has all of the information that it needs to 
-	 * consider sort avoidance.
-	 *
-	 * @param orderByList	The order by list
-	 *
-	 * @return Nothing.
-	 */
-	void pushOrderByList(OrderByList orderByList)
-	{
-		this.orderByList = orderByList;
-	}
-
-	/** 
-	 * Put a ProjectRestrictNode on top of each FromTable in the FromList.
-	 * ColumnReferences must continue to point to the same ResultColumn, so
-	 * that ResultColumn must percolate up to the new PRN.  However,
-	 * that ResultColumn will point to a new expression, a VirtualColumnNode, 
-	 * which points to the FromTable and the ResultColumn that is the source for
-	 * the ColumnReference.  
-	 * (The new PRN will have the original of the ResultColumnList and
-	 * the ResultColumns from that list.  The FromTable will get shallow copies
-	 * of the ResultColumnList and its ResultColumns.  ResultColumn.expression
-	 * will remain at the FromTable, with the PRN getting a new 
-	 * VirtualColumnNode for each ResultColumn.expression.)
-	 * We then project out the non-referenced columns.  If there are no referenced
-	 * columns, then the PRN's ResultColumnList will consist of a single ResultColumn
-	 * whose expression is 1.
-	 *
-	 * @param numTables			Number of tables in the DML Statement
-	 * @param gbl				The group by list, if any
-	 * @param fromList			The from list, if any
-	 *
-	 * @return The preprocessed ResultSetNode that can be optimized
-	 *
-	 * @exception StandardException		Thrown on error
-	 */
-
-	public ResultSetNode preprocess(int numTables,
-									GroupByList gbl,
-									FromList fromList)
-								throws StandardException
-	{
-		ResultSetNode newTop = this;
-
-		/* RESOLVE - what does numTables and referencedTableMap mean here? */
-		leftResultSet = leftResultSet.preprocess(numTables, gbl, fromList);
-		rightResultSet = rightResultSet.preprocess(numTables, gbl, fromList);
-
-		/* Build the referenced table map (left || right) */
-		referencedTableMap = (JBitSet) leftResultSet.getReferencedTableMap().clone();
-		referencedTableMap.or((JBitSet) rightResultSet.getReferencedTableMap());
-
-		/* If this is a UNION without an all and we have
-		 * an order by then we can consider eliminating the sort for the
-		 * order by.  All of the columns in the order by list must
-		 * be ascending in order to do this.  There are 2 cases:
-		 *	o	The order by list is an in order prefix of the columns
-		 *		in the select list.  In this case the output of the
-		 *		sort from the distinct will be in the right order
-		 *		so we simply eliminate the order by list.
-		 *	o	The order by list is a subset of the columns in the
-		 *		the select list.  In this case we need to reorder the
-		 *		columns in the select list so that the ordering columns
-		 *		are an in order prefix of the select list and put a PRN
-		 *		above the select so that the shape of the result set
-		 *		is as expected.
-		 */
-		if ((! all) && orderByList != null && orderByList.allAscending())
-		{
-			/* Order by list currently restricted to columns in select
-			 * list, so we will always eliminate the order by here.
-			 */
-			if (orderByList.isInOrderPrefix(resultColumns))
-			{
-				orderByList = null;
-			}
-			/* RESOLVE - We currently only eliminate the order by if it is
-			 * a prefix of the select list.  We do not currently do the 
-			 * elimination if the order by is not a prefix because the code
-			 * doesn't work.  The problem has something to do with the
-			 * fact that we generate additional nodes between the union
-			 * and the PRN (for reordering that we would generate here)
-			 * when modifying the access paths.  VCNs under the PRN can be
-			 * seen as correlated since their source resultset is the Union
-			 * which is no longer the result set directly under them.  This
-			 * causes the wrong code to get generated. (jerry - 11/3/98)
-			 * (bug 59)
-			 */
-		}
-
-		return newTop;
-	}
-	
-	/**
-	 * Ensure that the top of the RSN tree has a PredicateList.
-	 *
-	 * @param numTables			The number of tables in the query.
-	 * @return ResultSetNode	A RSN tree with a node which has a PredicateList on top.
-	 *
-	 * @exception StandardException		Thrown on error
-	 */
-	public ResultSetNode ensurePredicateList(int numTables) 
-		throws StandardException
-	{
-		return genProjectRestrict(numTables);
-	}
-
-	/**
-	 * Verify that a SELECT * is valid for this type of subquery.
-	 *
-	 * @param outerFromList	The FromList from the outer query block(s)
-	 * @param subqueryType	The subquery type
-	 *
-	 * @return	None
-	 *
-	 * @exception StandardException		Thrown on error
-	 */
-	public void verifySelectStarSubquery(FromList outerFromList, int subqueryType) 
-					throws StandardException
-	{
-		/* Check both sides - SELECT * is not valid on either side */
-		leftResultSet.verifySelectStarSubquery(outerFromList, subqueryType);
-		rightResultSet.verifySelectStarSubquery(outerFromList, subqueryType);
-	}
-
-	/** 
-	 * Determine whether or not the specified name is an exposed name in
-	 * the current query block.
-	 *
-	 * @param name	The specified name to search for as an exposed name.
-	 * @param schemaName	Schema name, if non-null.
-	 * @param exactMatch	Whether or not we need an exact match on specified schema and table
-	 *						names or match on table id.
-	 *
-	 * @return The FromTable, if any, with the exposed name.
-	 *
-	 * @exception StandardException		Thrown on error
-	 */
-	protected FromTable getFromTableByName(String name, String schemaName, boolean exactMatch)
-		throws StandardException
-	{
-		/* We search both sides for a TableOperatorNode (join nodes)
-		 * but only the left side for a UnionNode.
-		 */
-		return leftResultSet.getFromTableByName(name, schemaName, exactMatch);
-	}
-
-	/**
-	 * Set the result column for the subquery to a boolean true,
-	 * Useful for transformations such as
-	 * changing:
-	 *		where exists (select ... from ...) 
-	 * to:
-	 *		where (select true from ...)
-	 *
-	 * NOTE: No transformation is performed if the ResultColumn.expression is
-	 * already the correct boolean constant.
-	 * 
-	 * @param onlyConvertAlls	Boolean, whether or not to just convert *'s
-	 *
-	 * @return Nothing.
-	 *
-	 * @exception StandardException		Thrown on error
-	 */
-	public void setResultToBooleanTrueNode(boolean onlyConvertAlls)
-				throws StandardException
-	{
-		super.setResultToBooleanTrueNode(onlyConvertAlls);
-		leftResultSet.setResultToBooleanTrueNode(onlyConvertAlls);
-		rightResultSet.setResultToBooleanTrueNode(onlyConvertAlls);
-	}
-
-	/**
-	 * This ResultSet is the source for an Insert.  The target RCL
-	 * is in a different order and/or a superset of this RCL.  In most cases
-	 * we will reorder and/or add defaults to the current RCL so that is
-	 * matches the target RCL.  Those RSNs whose generate() method does
-	 * not handle projects will insert a PRN, with a new RCL which matches
-	 * the target RCL, above the current RSN.
-	 * NOTE - The new or enhanced RCL will be fully bound.
-	 *
-	 * @param numTargetColumns	# of columns in target RCL
-	 * @param colMap[]			int array representation of correspondence between
-	 *							RCLs - colmap[i] = -1 -> missing in current RCL
-	 *								   colmap[i] = j -> targetRCL(i) <-> thisRCL(j+1)
-	 * @param dataDictionary	DataDictionary to use
-	 * @param targetTD			TableDescriptor for target if the target is not a VTI, null if a VTI
-     * @param targetVTI         Target description if it is a VTI, null if not a VTI
-	 *
-	 * @return ResultSetNode	The new top of the tree
-	 *
-	 * @exception StandardException		Thrown on error
-	 */
-	public ResultSetNode enhanceRCLForInsert(int numTargetColumns, int[] colMap, 
-											 DataDictionary dataDictionary,
-											 TableDescriptor targetTD,
-                                             FromVTI targetVTI)
-			throws StandardException
-	{
-		// our newResultCols are put into the bound form straight away.
-		ResultColumnList newResultCols =
-								(ResultColumnList) getNodeFactory().getNode(
-												C_NodeTypes.RESULT_COLUMN_LIST,
-												getContextManager());
-		int numResultSetColumns = resultColumns.size();
-
-		/* Create a massaged version of the source RCL.
-		 * (Much simpler to build new list and then assign to source,
-		 * rather than massage the source list in place.)
-		 */
-		for (int index = 0; index < numTargetColumns; index++)
-		{
-			ResultColumn	newResultColumn;
-			ResultColumn	oldResultColumn;
-			ColumnReference newColumnReference;
-
-			if (colMap[index] != -1)
-			{
-				// getResultColumn uses 1-based positioning, so offset the colMap entry appropriately
-				oldResultColumn = resultColumns.getResultColumn(colMap[index]+1);
-
-				newColumnReference = (ColumnReference) getNodeFactory().getNode(
-												C_NodeTypes.COLUMN_REFERENCE,
-												oldResultColumn.getName(),
-												null,
-												getContextManager());
-				/* The ColumnReference points to the source of the value */
-				newColumnReference.setSource(oldResultColumn);
-				// colMap entry is 0-based, columnId is 1-based.
-				newColumnReference.setType(oldResultColumn.getExpressionType());
-
-				// Source of an insert, so nesting levels must be 0
-				newColumnReference.setNestingLevel(0);
-				newColumnReference.setSourceLevel(0);
-
-				// because the insert already copied the target table's
-				// column descriptors into the result, we grab it from there.
-				// alternatively, we could do what the else clause does,
-				// and look it up in the DD again.
-				newResultColumn = (ResultColumn) getNodeFactory().getNode(
-						C_NodeTypes.RESULT_COLUMN,
-						oldResultColumn.getType(),
-						newColumnReference,
-						getContextManager());
-			}
-			else
-			{
-				newResultColumn = genNewRCForInsert(targetTD, targetVTI, index + 1, dataDictionary);
-			}
-
-			newResultCols.addResultColumn(newResultColumn);
-		}
-
-		/* The generated ProjectRestrictNode now has the ResultColumnList
-		 * in the order that the InsertNode expects.
-		 * NOTE: This code here is an exception to several "rules":
-		 *		o  This is the only ProjectRestrictNode that is currently
-		 *		   generated outside of preprocess().
-		 *	    o  The UnionNode is the only node which is not at the
-		 *		   top of the query tree which has ColumnReferences under
-		 *		   its ResultColumnList prior to expression push down.
-		 */
-		return (ResultSetNode) getNodeFactory().getNode(
-									C_NodeTypes.PROJECT_RESTRICT_NODE,
-									this,
-									newResultCols,
-									null,
-									null,
-									null,
-									null,
-									tableProperties,
-									getContextManager());
-	}
-
-	/**
-	 * Evaluate whether or not the subquery in a FromSubquery is flattenable.  
-	 * Currently, a FSqry is flattenable if all of the following are true:
-	 *		o  Subquery is a SelectNode. (ie, not a RowResultSetNode or a UnionNode)
-	 *		o  It contains no top level subqueries.  (RESOLVE - we can relax this)
-	 *		o  It does not contain a group by or having clause
-	 *		o  It does not contain aggregates.
-	 *
-	 * @param fromList	The outer from list
-	 *
-	 * @return boolean	Whether or not the FromSubquery is flattenable.
-	 */
-	public boolean flattenableInFromSubquery(FromList fromList)
-	{
-		/* Unions in FromSubquerys are not flattenable.	 */
-		return false;
-	}
-
-	/**
-	 * Return whether or not to materialize this ResultSet tree.
-	 *
-	 * @return Whether or not to materialize this ResultSet tree.
-	 *			would return valid results.
-	 *
-	 * @exception StandardException		Thrown on error
-	 */
-	public boolean performMaterialization(JBitSet outerTables)
-		throws StandardException
-	{
-		// RESOLVE - just say no to materialization right now - should be a cost based decision
-		return false;
-
-		/* Actual materialization, if appropriate, will be placed by our parent PRN.
-		 * This is because PRN might have a join condition to apply.  (Materialization
-		 * can only occur before that.
-		 */
-		//return true;
-	}
-
-    /**
-     * @return the operator name: "UNION", "INTERSECT", or "EXCEPT"
-     */
-    abstract String getOperatorName();
-}
+/*
+
+   Derby - Class org.apache.derby.impl.sql.compile.SetOperatorNode
+
+   Copyright 2004 The Apache Software Foundation or its licensors, as applicable.
+
+   Licensed 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.impl.sql.compile;
+
+import org.apache.derby.iapi.services.sanity.SanityManager;
+
+import org.apache.derby.iapi.error.StandardException;
+
+import org.apache.derby.iapi.sql.compile.C_NodeTypes;
+
+import org.apache.derby.iapi.sql.dictionary.DataDictionary;
+import org.apache.derby.iapi.sql.dictionary.TableDescriptor;
+
+import org.apache.derby.iapi.reference.SQLState;
+import org.apache.derby.iapi.types.DataTypeDescriptor;
+
+import org.apache.derby.iapi.util.JBitSet;
+
+/**
+ * A SetOperatorNode represents a UNION, INTERSECT, or EXCEPT in a DML statement. Binding and optimization
+ * preprocessing is the same for all of these operations, so they share bind methods in this abstract class.
+ *
+ * The class contains a boolean telling whether the operation should eliminate
+ * duplicate rows.
+ *
+ * @author Jeff Lichtman
+ */
+
+public abstract class SetOperatorNode extends TableOperatorNode
+{
+	/**
+	** Tells whether to eliminate duplicate rows.  all == TRUE means do
+	** not eliminate duplicates, all == FALSE means eliminate duplicates.
+	*/
+	boolean			all;
+
+	OrderByList orderByList;
+
+
+	/**
+	 * Initializer for a SetOperatorNode.
+	 *
+	 * @param leftResult		The ResultSetNode on the left side of this union
+	 * @param rightResult		The ResultSetNode on the right side of this union
+	 * @param all				Whether or not this is an ALL.
+	 * @param tableProperties	Properties list associated with the table
+	 *
+	 * @exception StandardException		Thrown on error
+	 */
+
+	public void init(
+					Object leftResult,
+					Object rightResult,
+					Object all,
+					Object tableProperties)
+			throws StandardException
+	{
+		super.init(leftResult, rightResult, tableProperties);
+
+		this.all = ((Boolean) all).booleanValue();
+
+		/* resultColumns cannot be null, so we make a copy of the left RCL
+		 * for now.  At bind() time, we need to recopy the list because there
+		 * may have been a "*" in the list.  (We will set the names and
+		 * column types at that time, as expected.)
+		 */
+		resultColumns = leftResultSet.getResultColumns().copyListAndObjects();
+	}
+
+	/**
+	 * Convert this object to a String.  See comments in QueryTreeNode.java
+	 * for how this should be done for tree printing.
+	 *
+	 * @return	This object as a String
+	 */
+
+	public String toString()
+	{
+		if (SanityManager.DEBUG)
+		{
+			return 	"all: " + all + "\n" +
+				"orderByList: " + 
+				(orderByList != null ? orderByList.toString() : "null") + "\n" +
+				super.toString();
+		}
+		else
+		{
+			return "";
+		}
+	}
+
+	/**
+	 * Bind the result columns of this ResultSetNode when there is no
+	 * base table to bind them to.  This is useful for SELECT statements,
+	 * where the result columns get their types from the expressions that
+	 * live under them.
+	 *
+	 * @param fromListParam		FromList to use/append to.
+	 *
+	 * @return	Nothing
+	 *
+	 * @exception StandardException		Thrown on error
+	 */
+	public void bindResultColumns(FromList fromListParam)
+					throws StandardException
+	{
+		super.bindResultColumns(fromListParam);
+
+		/* Now we build our RCL */
+		buildRCL();
+	}
+
+	/**
+	 * Bind the result columns for this ResultSetNode to a base table.
+	 * This is useful for INSERT and UPDATE statements, where the
+	 * result columns get their types from the table being updated or
+	 * inserted into.
+	 * If a result column list is specified, then the verification that the 
+	 * result column list does not contain any duplicates will be done when
+	 * binding them by name.
+	 *
+	 * @param targetTableDescriptor	The TableDescriptor for the table being
+	 *				updated or inserted into
+	 * @param targetColumnList	For INSERT statements, the user
+	 *					does not have to supply column
+	 *					names (for example, "insert into t
+	 *					values (1,2,3)".  When this
+	 *					parameter is null, it means that
+	 *					the user did not supply column
+	 *					names, and so the binding should
+	 *					be done based on order.  When it
+	 *					is not null, it means do the binding
+	 *					by name, not position.
+	 * @param statement			Calling DMLStatementNode (Insert or Update)
+	 * @param fromListParam		FromList to use/append to.
+	 *
+	 * @return	Nothing
+	 *
+	 * @exception StandardException		Thrown on error
+	 */
+
+	public void bindResultColumns(TableDescriptor targetTableDescriptor,
+					FromVTI targetVTI,
+					ResultColumnList targetColumnList,
+					DMLStatementNode statement,
+					FromList fromListParam)
+				throws StandardException
+	{
+		super.bindResultColumns(targetTableDescriptor,
+								targetVTI,
+								targetColumnList, statement,
+								fromListParam);
+
+		/* Now we build our RCL */
+		buildRCL();
+	}
+
+	/**
+	 * Build the RCL for this node.  We propagate the RCL up from the
+	 * left child to form this node's RCL.
+	 *
+	 * @return	Nothing
+	 *
+	 * @exception StandardException		Thrown on error
+	 */
+
+	private void buildRCL() throws StandardException
+	{
+		/* Verify that both sides of the union have the same # of columns in their
+		 * RCL.
+		 */
+		if (leftResultSet.getResultColumns().size() !=
+			rightResultSet.getResultColumns().size())
+		{
+			throw StandardException.newException(SQLState.LANG_UNION_UNMATCHED_COLUMNS,
+                                                 getOperatorName());
+		}
+
+		/* We need to recreate resultColumns for this node, since there
+		 * may have been 1 or more *'s in the left's SELECT list.
+		 */
+		resultColumns = leftResultSet.getResultColumns().copyListAndObjects();
+
+		/* Create new expressions with the dominant types after verifying
+		 * union compatibility between left and right sides.
+		 */
+		resultColumns.setUnionResultExpression(rightResultSet.getResultColumns(), tableNumber, level, getOperatorName());
+	}
+
+	/**
+	 * Bind the result columns of a table constructor to the types in the
+	 * given ResultColumnList.  Use when inserting from a table constructor,
+	 * and there are nulls in the values clauses.
+	 *
+	 * @param rcl	The ResultColumnList with the types to bind to
+	 *
+	 * @exception StandardException		Thrown on error.
+	 */
+	public void bindUntypedNullsToResultColumns(ResultColumnList rcl)
+				throws StandardException
+	{
+		/*
+		** If the RCL from the parent is null, then
+		** the types are coming from the union itself.
+		** So we have to cross check the two child
+		** rcls.
+		*/
+		if (rcl == null)
+		{
+			ResultColumnList lrcl = rightResultSet.getResultColumns();
+			ResultColumnList rrcl = leftResultSet.getResultColumns();
+
+			leftResultSet.bindUntypedNullsToResultColumns(rrcl);
+			rightResultSet.bindUntypedNullsToResultColumns(lrcl);
+		}
+		else	
+		{
+			leftResultSet.bindUntypedNullsToResultColumns(rcl);
+			rightResultSet.bindUntypedNullsToResultColumns(rcl);
+		}			
+	}
+
+	/**
+	 * Get the parameter types from the given RowResultSetNode into the
+	 * given array of types.  If an array position is already filled in,
+	 * don't clobber it.
+	 *
+	 * @param types	The array of types to fill in
+	 * @param rrsn	The RowResultSetNode from which to take the param types
+	 *
+	 * @return	The number of new types found in the RowResultSetNode
+	 */
+	int getParamColumnTypes(DataTypeDescriptor[] types, RowResultSetNode rrsn)
+	{
+		int	numTypes = 0;
+
+		/* Look for columns where we have not found a non-? yet. */
+		for (int i = 0; i < types.length; i++)
+		{
+			if (types[i] == null)
+			{
+				ResultColumn rc =
+					(ResultColumn) rrsn.getResultColumns().elementAt(i);
+				if ( ! (rc.getExpression().isParameterNode()))
+				{
+					types[i] = rc.getExpressionType();
+					numTypes++;
+				}
+			}
+		}
+
+		return numTypes;
+	}
+
+	/**
+	 * Set the type of each ? parameter in the given RowResultSetNode
+	 * according to its ordinal position in the given array of types.
+	 *
+	 * @param types	An array of types containing the proper type for each
+	 *				? parameter, by ordinal position.
+	 * @param rrsn	A RowResultSetNode that could contain ? parameters whose
+	 *				types need to be set.
+	 *
+	 * @exception StandardException		Thrown on error
+	 */
+	void setParamColumnTypes(DataTypeDescriptor[] types, RowResultSetNode rrsn)
+					throws StandardException
+	{
+		/*
+		** Look for ? parameters in the result column list
+		** of each RowResultSetNode
+		*/
+		ResultColumnList rrcl = rrsn.getResultColumns();
+		int rrclSize = rrcl.size();
+		for (int index = 0; index < rrclSize; index++)
+		{
+			ResultColumn	rc = (ResultColumn) rrcl.elementAt(index);
+
+			if (rc.getExpression().isParameterNode())
+			{
+				/*
+				** We found a ? - set its type to the type from the
+				** type array.
+				*/
+				((ParameterNode) rc.getExpression()).setDescriptor(
+											types[index]);
+			}
+		}
+	}
+
+	/**
+	 * Bind the expressions in the target list.  This means binding the
+	 * sub-expressions, as well as figuring out what the return type is
+	 * for each expression.  This is useful for EXISTS subqueries, where we
+	 * need to validate the target list before blowing it away and replacing
+	 * it with a SELECT true.
+	 *
+	 * @return	Nothing
+	 *
+	 * @exception StandardException		Thrown on error
+	 */
+
+	public void bindTargetExpressions(FromList fromListParam)
+					throws StandardException
+	{
+		leftResultSet.bindTargetExpressions(fromListParam);
+		rightResultSet.bindTargetExpressions(fromListParam);
+	}
+
+	/**
+	 * Push the order by list down from the cursor node
+	 * into its child result set so that the optimizer
+	 * has all of the information that it needs to 
+	 * consider sort avoidance.
+	 *
+	 * @param orderByList	The order by list
+	 *
+	 * @return Nothing.
+	 */
+	void pushOrderByList(OrderByList orderByList)
+	{
+		this.orderByList = orderByList;
+	}
+
+	/** 
+	 * Put a ProjectRestrictNode on top of each FromTable in the FromList.
+	 * ColumnReferences must continue to point to the same ResultColumn, so
+	 * that ResultColumn must percolate up to the new PRN.  However,
+	 * that ResultColumn will point to a new expression, a VirtualColumnNode, 
+	 * which points to the FromTable and the ResultColumn that is the source for
+	 * the ColumnReference.  
+	 * (The new PRN will have the original of the ResultColumnList and
+	 * the ResultColumns from that list.  The FromTable will get shallow copies
+	 * of the ResultColumnList and its ResultColumns.  ResultColumn.expression
+	 * will remain at the FromTable, with the PRN getting a new 
+	 * VirtualColumnNode for each ResultColumn.expression.)
+	 * We then project out the non-referenced columns.  If there are no referenced
+	 * columns, then the PRN's ResultColumnList will consist of a single ResultColumn
+	 * whose expression is 1.
+	 *
+	 * @param numTables			Number of tables in the DML Statement
+	 * @param gbl				The group by list, if any
+	 * @param fromList			The from list, if any
+	 *
+	 * @return The preprocessed ResultSetNode that can be optimized
+	 *
+	 * @exception StandardException		Thrown on error
+	 */
+
+	public ResultSetNode preprocess(int numTables,
+									GroupByList gbl,
+									FromList fromList)
+								throws StandardException
+	{
+		ResultSetNode newTop = this;
+
+		/* RESOLVE - what does numTables and referencedTableMap mean here? */
+		leftResultSet = leftResultSet.preprocess(numTables, gbl, fromList);
+		rightResultSet = rightResultSet.preprocess(numTables, gbl, fromList);
+
+		/* Build the referenced table map (left || right) */
+		referencedTableMap = (JBitSet) leftResultSet.getReferencedTableMap().clone();
+		referencedTableMap.or((JBitSet) rightResultSet.getReferencedTableMap());
+
+		/* If this is a UNION without an all and we have
+		 * an order by then we can consider eliminating the sort for the
+		 * order by.  All of the columns in the order by list must
+		 * be ascending in order to do this.  There are 2 cases:
+		 *	o	The order by list is an in order prefix of the columns
+		 *		in the select list.  In this case the output of the
+		 *		sort from the distinct will be in the right order
+		 *		so we simply eliminate the order by list.
+		 *	o	The order by list is a subset of the columns in the
+		 *		the select list.  In this case we need to reorder the
+		 *		columns in the select list so that the ordering columns
+		 *		are an in order prefix of the select list and put a PRN
+		 *		above the select so that the shape of the result set
+		 *		is as expected.
+		 */
+		if ((! all) && orderByList != null && orderByList.allAscending())
+		{
+			/* Order by list currently restricted to columns in select
+			 * list, so we will always eliminate the order by here.
+			 */
+			if (orderByList.isInOrderPrefix(resultColumns))
+			{
+				orderByList = null;
+			}
+			/* RESOLVE - We currently only eliminate the order by if it is
+			 * a prefix of the select list.  We do not currently do the 
+			 * elimination if the order by is not a prefix because the code
+			 * doesn't work.  The problem has something to do with the
+			 * fact that we generate additional nodes between the union
+			 * and the PRN (for reordering that we would generate here)
+			 * when modifying the access paths.  VCNs under the PRN can be
+			 * seen as correlated since their source resultset is the Union
+			 * which is no longer the result set directly under them.  This
+			 * causes the wrong code to get generated. (jerry - 11/3/98)
+			 * (bug 59)
+			 */
+		}
+
+		return newTop;
+	}
+	
+	/**
+	 * Ensure that the top of the RSN tree has a PredicateList.
+	 *
+	 * @param numTables			The number of tables in the query.
+	 * @return ResultSetNode	A RSN tree with a node which has a PredicateList on top.
+	 *
+	 * @exception StandardException		Thrown on error
+	 */
+	public ResultSetNode ensurePredicateList(int numTables) 
+		throws StandardException
+	{
+		return genProjectRestrict(numTables);
+	}
+
+	/**
+	 * Verify that a SELECT * is valid for this type of subquery.
+	 *
+	 * @param outerFromList	The FromList from the outer query block(s)
+	 * @param subqueryType	The subquery type
+	 *
+	 * @return	None
+	 *
+	 * @exception StandardException		Thrown on error
+	 */
+	public void verifySelectStarSubquery(FromList outerFromList, int subqueryType) 
+					throws StandardException
+	{
+		/* Check both sides - SELECT * is not valid on either side */
+		leftResultSet.verifySelectStarSubquery(outerFromList, subqueryType);
+		rightResultSet.verifySelectStarSubquery(outerFromList, subqueryType);
+	}
+
+	/** 
+	 * Determine whether or not the specified name is an exposed name in
+	 * the current query block.
+	 *
+	 * @param name	The specified name to search for as an exposed name.
+	 * @param schemaName	Schema name, if non-null.
+	 * @param exactMatch	Whether or not we need an exact match on specified schema and table
+	 *						names or match on table id.
+	 *
+	 * @return The FromTable, if any, with the exposed name.
+	 *
+	 * @exception StandardException		Thrown on error
+	 */
+	protected FromTable getFromTableByName(String name, String schemaName, boolean exactMatch)
+		throws StandardException
+	{
+		/* We search both sides for a TableOperatorNode (join nodes)
+		 * but only the left side for a UnionNode.
+		 */
+		return leftResultSet.getFromTableByName(name, schemaName, exactMatch);
+	}
+
+	/**
+	 * Set the result column for the subquery to a boolean true,
+	 * Useful for transformations such as
+	 * changing:
+	 *		where exists (select ... from ...) 
+	 * to:
+	 *		where (select true from ...)
+	 *
+	 * NOTE: No transformation is performed if the ResultColumn.expression is
+	 * already the correct boolean constant.
+	 * 
+	 * @param onlyConvertAlls	Boolean, whether or not to just convert *'s
+	 *
+	 * @return Nothing.
+	 *
+	 * @exception StandardException		Thrown on error
+	 */
+	public void setResultToBooleanTrueNode(boolean onlyConvertAlls)
+				throws StandardException
+	{
+		super.setResultToBooleanTrueNode(onlyConvertAlls);
+		leftResultSet.setResultToBooleanTrueNode(onlyConvertAlls);
+		rightResultSet.setResultToBooleanTrueNode(onlyConvertAlls);
+	}
+
+	/**
+	 * This ResultSet is the source for an Insert.  The target RCL
+	 * is in a different order and/or a superset of this RCL.  In most cases
+	 * we will reorder and/or add defaults to the current RCL so that is
+	 * matches the target RCL.  Those RSNs whose generate() method does
+	 * not handle projects will insert a PRN, with a new RCL which matches
+	 * the target RCL, above the current RSN.
+	 * NOTE - The new or enhanced RCL will be fully bound.
+	 *
+	 * @param numTargetColumns	# of columns in target RCL
+	 * @param colMap[]			int array representation of correspondence between
+	 *							RCLs - colmap[i] = -1 -> missing in current RCL
+	 *								   colmap[i] = j -> targetRCL(i) <-> thisRCL(j+1)
+	 * @param dataDictionary	DataDictionary to use
+	 * @param targetTD			TableDescriptor for target if the target is not a VTI, null if a VTI
+     * @param targetVTI         Target description if it is a VTI, null if not a VTI
+	 *
+	 * @return ResultSetNode	The new top of the tree
+	 *
+	 * @exception StandardException		Thrown on error
+	 */
+	public ResultSetNode enhanceRCLForInsert(int numTargetColumns, int[] colMap, 
+											 DataDictionary dataDictionary,
+											 TableDescriptor targetTD,
+                                             FromVTI targetVTI)
+			throws StandardException
+	{
+		// our newResultCols are put into the bound form straight away.
+		ResultColumnList newResultCols =
+								(ResultColumnList) getNodeFactory().getNode(
+												C_NodeTypes.RESULT_COLUMN_LIST,
+												getContextManager());
+		int numResultSetColumns = resultColumns.size();
+
+		/* Create a massaged version of the source RCL.
+		 * (Much simpler to build new list and then assign to source,
+		 * rather than massage the source list in place.)
+		 */
+		for (int index = 0; index < numTargetColumns; index++)
+		{
+			ResultColumn	newResultColumn;
+			ResultColumn	oldResultColumn;
+			ColumnReference newColumnReference;
+
+			if (colMap[index] != -1)
+			{
+				// getResultColumn uses 1-based positioning, so offset the colMap entry appropriately
+				oldResultColumn = resultColumns.getResultColumn(colMap[index]+1);
+
+				newColumnReference = (ColumnReference) getNodeFactory().getNode(
+												C_NodeTypes.COLUMN_REFERENCE,
+												oldResultColumn.getName(),
+												null,
+												getContextManager());
+				/* The ColumnReference points to the source of the value */
+				newColumnReference.setSource(oldResultColumn);
+				// colMap entry is 0-based, columnId is 1-based.
+				newColumnReference.setType(oldResultColumn.getExpressionType());
+
+				// Source of an insert, so nesting levels must be 0
+				newColumnReference.setNestingLevel(0);
+				newColumnReference.setSourceLevel(0);
+
+				// because the insert already copied the target table's
+				// column descriptors into the result, we grab it from there.
+				// alternatively, we could do what the else clause does,
+				// and look it up in the DD again.
+				newResultColumn = (ResultColumn) getNodeFactory().getNode(
+						C_NodeTypes.RESULT_COLUMN,
+						oldResultColumn.getType(),
+						newColumnReference,
+						getContextManager());
+			}
+			else
+			{
+				newResultColumn = genNewRCForInsert(targetTD, targetVTI, index + 1, dataDictionary);
+			}
+
+			newResultCols.addResultColumn(newResultColumn);
+		}
+
+		/* The generated ProjectRestrictNode now has the ResultColumnList
+		 * in the order that the InsertNode expects.
+		 * NOTE: This code here is an exception to several "rules":
+		 *		o  This is the only ProjectRestrictNode that is currently
+		 *		   generated outside of preprocess().
+		 *	    o  The UnionNode is the only node which is not at the
+		 *		   top of the query tree which has ColumnReferences under
+		 *		   its ResultColumnList prior to expression push down.
+		 */
+		return (ResultSetNode) getNodeFactory().getNode(
+									C_NodeTypes.PROJECT_RESTRICT_NODE,
+									this,
+									newResultCols,
+									null,
+									null,
+									null,
+									null,
+									tableProperties,
+									getContextManager());
+	}
+
+	/**
+	 * Evaluate whether or not the subquery in a FromSubquery is flattenable.  
+	 * Currently, a FSqry is flattenable if all of the following are true:
+	 *		o  Subquery is a SelectNode. (ie, not a RowResultSetNode or a UnionNode)
+	 *		o  It contains no top level subqueries.  (RESOLVE - we can relax this)
+	 *		o  It does not contain a group by or having clause
+	 *		o  It does not contain aggregates.
+	 *
+	 * @param fromList	The outer from list
+	 *
+	 * @return boolean	Whether or not the FromSubquery is flattenable.
+	 */
+	public boolean flattenableInFromSubquery(FromList fromList)
+	{
+		/* Unions in FromSubquerys are not flattenable.	 */
+		return false;
+	}
+
+	/**
+	 * Return whether or not to materialize this ResultSet tree.
+	 *
+	 * @return Whether or not to materialize this ResultSet tree.
+	 *			would return valid results.
+	 *
+	 * @exception StandardException		Thrown on error
+	 */
+	public boolean performMaterialization(JBitSet outerTables)
+		throws StandardException
+	{
+		// RESOLVE - just say no to materialization right now - should be a cost based decision
+		return false;
+
+		/* Actual materialization, if appropriate, will be placed by our parent PRN.
+		 * This is because PRN might have a join condition to apply.  (Materialization
+		 * can only occur before that.
+		 */
+		//return true;
+	}
+
+    /**
+     * @return the operator name: "UNION", "INTERSECT", or "EXCEPT"
+     */
+    abstract String getOperatorName();
+}

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

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SetSchemaNode.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SetTransactionIsolationNode.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SimpleStringOperatorNode.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SingleChildResultSetNode.java
            ('svn:executable' removed)

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SpecialFunctionNode.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SpecialFunctionNode.java?rev=329187&r1=329186&r2=329187&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SpecialFunctionNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SpecialFunctionNode.java Fri Oct 28 04:51:50 2005
@@ -1,224 +1,224 @@
-/*
-
-   Derby - Class org.apache.derby.impl.sql.compile.SpecialFunctionNode
-
-   Copyright 1999, 2005 The Apache Software Foundation or its licensors, as applicable.
-
-   Licensed 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.impl.sql.compile;
-
-import org.apache.derby.iapi.sql.compile.CompilerContext;
-
-import org.apache.derby.iapi.types.DataTypeDescriptor;
-
-import org.apache.derby.iapi.services.compiler.MethodBuilder;
-import org.apache.derby.iapi.services.compiler.LocalField;
-
-import org.apache.derby.iapi.services.sanity.SanityManager;
-
-import org.apache.derby.iapi.store.access.Qualifier;
-
-import org.apache.derby.impl.sql.compile.ExpressionClassBuilder;
-
-import java.lang.reflect.Modifier;
-
-import org.apache.derby.iapi.error.StandardException;
-import org.apache.derby.iapi.reference.ClassName;
-import org.apache.derby.iapi.services.classfile.VMOpcode;
-import org.apache.derby.iapi.sql.compile.C_NodeTypes;
-
-
-import java.sql.Types;
-
-import java.util.Vector;
-
-/**
-     SpecialFunctionNode handles system SQL functions.
-	 A function value is either obtained by a method
-	 call off the LanguageConnectionContext or Activation.
-	 LanguageConnectionContext functions are state related to the connection.
-	 Activation functions are those related to the statement execution.
-
-     Each SQL function takes no arguments and returns a SQLvalue.
-	 <P>
-	 Functions supported:
-	 <UL>
-	 <LI> USER
-	 <LI> CURRENT_USER
-	 <LI> SESSION_USER
-	 <LI> SYSTEM_USER
-	 <LI> CURRENT SCHEMA
-	 <LI> CURRENT ISOLATION
-	 <LI> IDENTITY_VAL_LOCAL
-
-	 </UL>
-
-
-	<P>
-
-	 This node is used rather than some use of MethodCallNode for
-	 runtime performance. MethodCallNode does not provide a fast access
-	 to the current language connection or activatation, since it is geared
-	 towards user defined routines.
-
-
-*/
-public class SpecialFunctionNode extends ValueNode 
-{
-	/**
-		Name of SQL function
-	*/
-	String sqlName;
-
-	/**
-		Java method name
-	*/
-	private String methodName;
-
-	/**
-		Return type of Java method.
-	*/
-	private String methodType;
-
-	/**
-	*/
-	//private boolean isActivationCall;
-
-	/**
-	 * Binding this special function means setting the result DataTypeServices.
-	 * In this case, the result type is based on the operation requested.
-	 *
-	 * @param fromList			The FROM list for the statement.  This parameter
-	 *							is not used in this case.
-	 * @param subqueryList		The subquery list being built as we find 
-	 *							SubqueryNodes. Not used in this case.
-	 * @param aggregateVector	The aggregate vector being built as we find 
-	 *							AggregateNodes. Not used in this case.
-	 *
-	 * @return	The new top of the expression tree.
-	 *
-	 * @exception StandardException		Thrown on error
-	 */
-	public ValueNode bindExpression(FromList fromList, SubqueryList subqueryList,
-							Vector	aggregateVector)
-					throws StandardException
-	{		DataTypeDescriptor dtd;
-		int nodeType = getNodeType();
-		switch (nodeType)
-		{
-		case C_NodeTypes.USER_NODE:
-		case C_NodeTypes.CURRENT_USER_NODE:
-		case C_NodeTypes.SESSION_USER_NODE:
-		case C_NodeTypes.SYSTEM_USER_NODE:
-			switch (nodeType)
-			{
-				case C_NodeTypes.USER_NODE: sqlName = "USER"; break;
-				case C_NodeTypes.CURRENT_USER_NODE: sqlName = "CURRENT_USER"; break;
-				case C_NodeTypes.SESSION_USER_NODE: sqlName = "SESSION_USER"; break;
-				case C_NodeTypes.SYSTEM_USER_NODE: sqlName = "SYSTEM_USER"; break;
-			}
-			methodName = "getAuthorizationId";
-			methodType = "java.lang.String";
-			dtd = DataTypeDescriptor.getBuiltInDataTypeDescriptor(Types.VARCHAR, false, 128);
-			break;
-
-		case C_NodeTypes.CURRENT_SCHEMA_NODE:
-			sqlName = "CURRENT SCHEMA";
-			methodName = "getCurrentSchemaName";
-			methodType = "java.lang.String";
-			dtd = DataTypeDescriptor.getBuiltInDataTypeDescriptor(Types.VARCHAR, false, 128);
-			break;
-
-		case C_NodeTypes.IDENTITY_VAL_NODE:
-			sqlName = "IDENTITY_VAL_LOCAL";
-			methodName = "getIdentityValue";
-			methodType = "java.lang.Long";
-			dtd = DataTypeDescriptor.getSQLDataTypeDescriptor("java.math.BigDecimal", 31, 0, true, 31);
-			break;
-
-		case C_NodeTypes.CURRENT_ISOLATION_NODE:
-			sqlName = "CURRENT ISOLATION";
-			methodName = "getCurrentIsolationLevelStr";
-			methodType = "java.lang.String";
-			dtd = DataTypeDescriptor.getBuiltInDataTypeDescriptor(Types.CHAR, 2);
-			break;
-		default:
-			if (SanityManager.DEBUG)
-			{
-				SanityManager.THROWASSERT("Invalid type for SpecialFunctionNode " + nodeType);
-			}
-			dtd = null;
-			break;
-		}
-
-		checkReliability(sqlName, CompilerContext.USER_ILLEGAL );
-		setType(dtd);
-
-		return this;
-	}
-
-	/**
-	 * Return the variant type for the underlying expression.
-	   All supported special functions are QUERY_INVARIANT
-
-	 *
-	 * @return	The variant type for the underlying expression.
-	 */
-	protected int getOrderableVariantType()
-	{
-		return Qualifier.QUERY_INVARIANT;
-	}
-
-	/**
-		Generate an expression that returns a DataValueDescriptor and
-		calls a method off the language connection or the activation.
-	 *
-	 * @param acb	The ExpressionClassBuilder for the class being built
-	 * @param mb	The method the code to place the code
-	 *
-	 *
-	 * @exception StandardException		Thrown on error
-	 */
-	public void generateExpression(ExpressionClassBuilder acb,
-											MethodBuilder mb)
-									throws StandardException
-	{
-		mb.pushThis();
-		mb.callMethod(VMOpcode.INVOKEINTERFACE, ClassName.Activation, "getLanguageConnectionContext",
-											 ClassName.LanguageConnectionContext, 0);
-
-		mb.callMethod(VMOpcode.INVOKEINTERFACE, (String) null, methodName, methodType, 0);
-
-		String fieldType = getTypeCompiler().interfaceName();
-		LocalField field = acb.newFieldDeclaration(Modifier.PRIVATE, fieldType);
-
-		acb.generateDataValue(mb, getTypeCompiler(), field);
-	}
-
-	/*
-		print the non-node subfields
-	 */
-	public String toString() {
-		if (SanityManager.DEBUG)
-		{
-			return super.toString()+ sqlName;
-		}
-		else
-		{
-			return "";
-		}
-	}
-}
+/*
+
+   Derby - Class org.apache.derby.impl.sql.compile.SpecialFunctionNode
+
+   Copyright 1999, 2005 The Apache Software Foundation or its licensors, as applicable.
+
+   Licensed 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.impl.sql.compile;
+
+import org.apache.derby.iapi.sql.compile.CompilerContext;
+
+import org.apache.derby.iapi.types.DataTypeDescriptor;
+
+import org.apache.derby.iapi.services.compiler.MethodBuilder;
+import org.apache.derby.iapi.services.compiler.LocalField;
+
+import org.apache.derby.iapi.services.sanity.SanityManager;
+
+import org.apache.derby.iapi.store.access.Qualifier;
+
+import org.apache.derby.impl.sql.compile.ExpressionClassBuilder;
+
+import java.lang.reflect.Modifier;
+
+import org.apache.derby.iapi.error.StandardException;
+import org.apache.derby.iapi.reference.ClassName;
+import org.apache.derby.iapi.services.classfile.VMOpcode;
+import org.apache.derby.iapi.sql.compile.C_NodeTypes;
+
+
+import java.sql.Types;
+
+import java.util.Vector;
+
+/**
+     SpecialFunctionNode handles system SQL functions.
+	 A function value is either obtained by a method
+	 call off the LanguageConnectionContext or Activation.
+	 LanguageConnectionContext functions are state related to the connection.
+	 Activation functions are those related to the statement execution.
+
+     Each SQL function takes no arguments and returns a SQLvalue.
+	 <P>
+	 Functions supported:
+	 <UL>
+	 <LI> USER
+	 <LI> CURRENT_USER
+	 <LI> SESSION_USER
+	 <LI> SYSTEM_USER
+	 <LI> CURRENT SCHEMA
+	 <LI> CURRENT ISOLATION
+	 <LI> IDENTITY_VAL_LOCAL
+
+	 </UL>
+
+
+	<P>
+
+	 This node is used rather than some use of MethodCallNode for
+	 runtime performance. MethodCallNode does not provide a fast access
+	 to the current language connection or activatation, since it is geared
+	 towards user defined routines.
+
+
+*/
+public class SpecialFunctionNode extends ValueNode 
+{
+	/**
+		Name of SQL function
+	*/
+	String sqlName;
+
+	/**
+		Java method name
+	*/
+	private String methodName;
+
+	/**
+		Return type of Java method.
+	*/
+	private String methodType;
+
+	/**
+	*/
+	//private boolean isActivationCall;
+
+	/**
+	 * Binding this special function means setting the result DataTypeServices.
+	 * In this case, the result type is based on the operation requested.
+	 *
+	 * @param fromList			The FROM list for the statement.  This parameter
+	 *							is not used in this case.
+	 * @param subqueryList		The subquery list being built as we find 
+	 *							SubqueryNodes. Not used in this case.
+	 * @param aggregateVector	The aggregate vector being built as we find 
+	 *							AggregateNodes. Not used in this case.
+	 *
+	 * @return	The new top of the expression tree.
+	 *
+	 * @exception StandardException		Thrown on error
+	 */
+	public ValueNode bindExpression(FromList fromList, SubqueryList subqueryList,
+							Vector	aggregateVector)
+					throws StandardException
+	{		DataTypeDescriptor dtd;
+		int nodeType = getNodeType();
+		switch (nodeType)
+		{
+		case C_NodeTypes.USER_NODE:
+		case C_NodeTypes.CURRENT_USER_NODE:
+		case C_NodeTypes.SESSION_USER_NODE:
+		case C_NodeTypes.SYSTEM_USER_NODE:
+			switch (nodeType)
+			{
+				case C_NodeTypes.USER_NODE: sqlName = "USER"; break;
+				case C_NodeTypes.CURRENT_USER_NODE: sqlName = "CURRENT_USER"; break;
+				case C_NodeTypes.SESSION_USER_NODE: sqlName = "SESSION_USER"; break;
+				case C_NodeTypes.SYSTEM_USER_NODE: sqlName = "SYSTEM_USER"; break;
+			}
+			methodName = "getAuthorizationId";
+			methodType = "java.lang.String";
+			dtd = DataTypeDescriptor.getBuiltInDataTypeDescriptor(Types.VARCHAR, false, 128);
+			break;
+
+		case C_NodeTypes.CURRENT_SCHEMA_NODE:
+			sqlName = "CURRENT SCHEMA";
+			methodName = "getCurrentSchemaName";
+			methodType = "java.lang.String";
+			dtd = DataTypeDescriptor.getBuiltInDataTypeDescriptor(Types.VARCHAR, false, 128);
+			break;
+
+		case C_NodeTypes.IDENTITY_VAL_NODE:
+			sqlName = "IDENTITY_VAL_LOCAL";
+			methodName = "getIdentityValue";
+			methodType = "java.lang.Long";
+			dtd = DataTypeDescriptor.getSQLDataTypeDescriptor("java.math.BigDecimal", 31, 0, true, 31);
+			break;
+
+		case C_NodeTypes.CURRENT_ISOLATION_NODE:
+			sqlName = "CURRENT ISOLATION";
+			methodName = "getCurrentIsolationLevelStr";
+			methodType = "java.lang.String";
+			dtd = DataTypeDescriptor.getBuiltInDataTypeDescriptor(Types.CHAR, 2);
+			break;
+		default:
+			if (SanityManager.DEBUG)
+			{
+				SanityManager.THROWASSERT("Invalid type for SpecialFunctionNode " + nodeType);
+			}
+			dtd = null;
+			break;
+		}
+
+		checkReliability(sqlName, CompilerContext.USER_ILLEGAL );
+		setType(dtd);
+
+		return this;
+	}
+
+	/**
+	 * Return the variant type for the underlying expression.
+	   All supported special functions are QUERY_INVARIANT
+
+	 *
+	 * @return	The variant type for the underlying expression.
+	 */
+	protected int getOrderableVariantType()
+	{
+		return Qualifier.QUERY_INVARIANT;
+	}
+
+	/**
+		Generate an expression that returns a DataValueDescriptor and
+		calls a method off the language connection or the activation.
+	 *
+	 * @param acb	The ExpressionClassBuilder for the class being built
+	 * @param mb	The method the code to place the code
+	 *
+	 *
+	 * @exception StandardException		Thrown on error
+	 */
+	public void generateExpression(ExpressionClassBuilder acb,
+											MethodBuilder mb)
+									throws StandardException
+	{
+		mb.pushThis();
+		mb.callMethod(VMOpcode.INVOKEINTERFACE, ClassName.Activation, "getLanguageConnectionContext",
+											 ClassName.LanguageConnectionContext, 0);
+
+		mb.callMethod(VMOpcode.INVOKEINTERFACE, (String) null, methodName, methodType, 0);
+
+		String fieldType = getTypeCompiler().interfaceName();
+		LocalField field = acb.newFieldDeclaration(Modifier.PRIVATE, fieldType);
+
+		acb.generateDataValue(mb, getTypeCompiler(), field);
+	}
+
+	/*
+		print the non-node subfields
+	 */
+	public String toString() {
+		if (SanityManager.DEBUG)
+		{
+			return super.toString()+ sqlName;
+		}
+		else
+		{
+			return "";
+		}
+	}
+}

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

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/StatementNode.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/StaticClassFieldReferenceNode.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/StaticMethodCallNode.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/StringSlicer.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SubqueryList.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SubqueryNode.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SumAvgAggregateDefinition.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TableElementList.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TableElementNode.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TableName.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TableOperatorNode.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TernaryOperatorNode.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TestConstraintNode.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TimeTypeCompiler.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TimestampOperatorNode.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TimestampTypeCompiler.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/Token.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TransactionStatementNode.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TriggerReferencingStruct.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TypeCompilerFactoryImpl.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UCode_CharStream.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UnaryArithmeticOperatorNode.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UnaryComparisonOperatorNode.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UnaryLogicalOperatorNode.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UnaryOperatorNode.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UnionNode.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UntypedNullConstantNode.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UpdateNode.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UserDefinedTypeCompiler.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/UserTypeConstantNode.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/VTIDeferModPolicy.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ValueNode.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ValueNodeList.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/VarbitConstantNode.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/VerifyAggregateExpressionsVisitor.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/VirtualColumnNode.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/CachedStatement.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericAuthorizer.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionContext.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionFactory.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericStatementContext.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/TempTableInfo.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/depend/BasicDependency.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/depend/BasicDependencyManager.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/depend/BasicProviderInfo.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/depend/DepClassInfo.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/AddJarConstantAction.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/AggregateSortObserver.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/AggregatorInfo.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/AggregatorInfoList.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/AlterTableConstantAction.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/AnyResultSet.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/AutoincrementCounter.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/AvgAggregator.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/BaseActivation.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/BaseExpressionActivation.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/BasicNoPutResultSetImpl.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/BasicSortObserver.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/BulkTableScanResultSet.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/CallStatementResultSet.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/CardinalityCounter.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ColumnInfo.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ConstantActionActivation.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ConstraintConstantAction.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ConstraintInfo.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/CountAggregator.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/CreateAliasConstantAction.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/CreateConstraintConstantAction.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/CreateIndexConstantAction.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/CreateSchemaConstantAction.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/CreateTableConstantAction.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/CreateTriggerConstantAction.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/CreateViewConstantAction.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/CurrentDatetime.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/CurrentOfResultSet.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/CursorActivation.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DDLConstantAction.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DDLSingleTableConstantAction.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DMLVTIResultSet.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DMLWriteResultSet.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DeleteCascadeResultSet.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DeleteConstantAction.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DeleteResultSet.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DeleteVTIResultSet.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DependentResultSet.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DistinctGroupedAggregateResultSet.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DistinctScalarAggregateResultSet.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DistinctScanResultSet.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DropAliasConstantAction.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DropConstraintConstantAction.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DropIndexConstantAction.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DropJarConstantAction.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DropSchemaConstantAction.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DropStatisticsConstantAction.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DropTableConstantAction.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DropTriggerConstantAction.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DropViewConstantAction.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/FKInfo.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ForeignKeyRIChecker.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericAggregateResultSet.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericAggregator.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericConstantAction.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericConstantActionFactory.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericExecutionContext.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericExecutionFactory.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericQualifier.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericRIChecker.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericResultSetFactory.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericScanQualifier.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericTriggerExecutor.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GroupedAggregateResultSet.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/HashJoinResultSet.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/HashLeftOuterJoinResultSet.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/HashScanResultSet.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/HashTableResultSet.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/IndexChanger.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/IndexColumnOrder.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/IndexConstantAction.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/IndexRow.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/IndexRowToBaseRowResultSet.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/IndexSetChanger.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/IndexValueRow.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/InsertConstantAction.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/InsertResultSet.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/InsertVTIResultSet.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/InternalTriggerExecutionContext.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/JarDDL.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/JarUtil.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/JoinResultSet.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/KeyToBaseRowConstantAction.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/LastIndexKeyResultSet.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/LockTableConstantAction.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/MaterializedResultSet.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/MaxMinAggregator.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/MergeJoinResultSet.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/MiscResultSet.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/NestedLoopJoinResultSet.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/NestedLoopLeftOuterJoinResultSet.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/NoPutResultSetImpl.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/NoRowsResultSetImpl.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/NormalizeResultSet.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/OnceResultSet.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/OrderableAggregator.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ProjectRestrictResultSet.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/RIBulkChecker.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/RISetChecker.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/RealResultSetStatisticsFactory.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ReferencedKeyRIChecker.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/RenameConstantAction.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ReplaceJarConstantAction.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/RowChangerImpl.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/RowResultSet.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/RowTriggerExecutor.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/RowUtil.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/SavepointConstantAction.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ScalarAggregateResultSet.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ScrollInsensitiveResultSet.java
            ('svn:executable' removed)

Propchange: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/SetConstraintsConstantAction.java
            ('svn:executable' removed)



Mime
View raw message