You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by ka...@apache.org on 2013/03/21 13:54:00 UTC
svn commit: r1459276 [1/2] -
/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/
Author: kahatlen
Date: Thu Mar 21 12:53:57 2013
New Revision: 1459276
URL: http://svn.apache.org/r1459276
Log:
DERBY-6075: Use modern collections in impl/sql/compile
Rename variables from aggregateVector to aggregates.
Modified:
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/AndNode.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/BinaryComparisonOperatorNode.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/BinaryLogicalOperatorNode.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/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/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/CurrentDatetimeOperatorNode.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/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/ExtractOperatorNode.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/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/IsNode.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/JavaValueNode.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/MethodCallNode.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/OrNode.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/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/ResultSetNode.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/SelectNode.java
db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SetOperatorNode.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/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/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/UnaryComparisonOperatorNode.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/UnaryLogicalOperatorNode.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/UntypedNullConstantNode.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/WindowFunctionNode.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/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=1459276&r1=1459275&r2=1459276&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 Mar 21 12:53:57 2013
@@ -259,16 +259,14 @@ public class AggregateNode extends Unary
*
* @param fromList The query's FROM list
* @param subqueryList The subquery list being built as we find SubqueryNodes
- * @param aggregateVector The aggregate list being built as we find AggregateNodes
+ * @param aggregates The aggregate list being built as we find AggregateNodes
*
* @return The new top of the expression tree.
*
* @exception StandardException Thrown on error
*/
- public ValueNode bindExpression(
- FromList fromList,
- SubqueryList subqueryList,
- List aggregateVector)
+ ValueNode bindExpression(
+ FromList fromList, SubqueryList subqueryList, List aggregates)
throws StandardException
{
DataDictionary dd = getDataDictionary();
@@ -320,8 +318,8 @@ public class AggregateNode extends Unary
}
}
- /* Add ourselves to the aggregateVector before we do anything else */
- aggregateVector.add(this);
+ // Add ourselves to the list of aggregates before we do anything else.
+ aggregates.add(this);
CompilerContext cc = getCompilerContext();
@@ -329,7 +327,7 @@ public class AggregateNode extends Unary
if (operand != null)
{
int previousReliability = orReliability( CompilerContext.AGGREGATE_RESTRICTION );
- bindOperand(fromList, subqueryList, aggregateVector);
+ bindOperand(fromList, subqueryList, aggregates);
cc.setReliability( previousReliability );
/*
@@ -423,7 +421,7 @@ public class AggregateNode extends Unary
if ( castNode != null )
{
- operand = castNode.bindExpression( fromList, subqueryList, aggregateVector );
+ operand = castNode.bindExpression( fromList, subqueryList, aggregates );
}
}
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=1459276&r1=1459275&r2=1459276&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 Mar 21 12:53:57 2013
@@ -58,14 +58,12 @@ public final class AggregateWindowFuncti
* ValueNode override.
* @see ValueNode#bindExpression
*/
- public ValueNode bindExpression(
- FromList fromList,
- SubqueryList subqueryList,
- List aggregateVector)
+ ValueNode bindExpression(
+ FromList fromList, SubqueryList subqueryList, List aggregates)
throws StandardException
{
aggregateFunction.bindExpression(
- fromList, subqueryList, aggregateVector);
+ fromList, subqueryList, aggregates);
return this;
}
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=1459276&r1=1459275&r2=1459276&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 Mar 21 12:53:57 2013
@@ -51,18 +51,18 @@ public class AndNode extends BinaryLogic
*
* @param fromList The query's FROM list
* @param subqueryList The subquery list being built as we find SubqueryNodes
- * @param aggregateVector The aggregate vector being built as we find AggregateNodes
+ * @param aggregates The aggregate list being built as we find AggregateNodes
*
* @return The new top of the expression tree.
*
* @exception StandardException Thrown on error
*/
- public ValueNode bindExpression(
- FromList fromList, SubqueryList subqueryList, List aggregateVector)
+ ValueNode bindExpression(
+ FromList fromList, SubqueryList subqueryList, List aggregates)
throws StandardException
{
- super.bindExpression(fromList, subqueryList, aggregateVector);
+ super.bindExpression(fromList, subqueryList, aggregates);
postBindFixup();
return this;
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=1459276&r1=1459275&r2=1459276&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 Mar 21 12:53:57 2013
@@ -109,19 +109,18 @@ public final class BinaryArithmeticOpera
*
* @param fromList The query's FROM list
* @param subqueryList The subquery list being built as we find SubqueryNodes
- * @param aggregateVector The aggregate vector being built as we find AggregateNodes
+ * @param aggregates The aggregate list being built as we find AggregateNodes
*
* @return The new top of the expression tree.
*
* @exception StandardException Thrown on error
*/
- public ValueNode bindExpression(
- FromList fromList, SubqueryList subqueryList, List aggregateVector)
+ ValueNode bindExpression(
+ FromList fromList, SubqueryList subqueryList, List aggregates)
throws StandardException
{
- super.bindExpression(fromList, subqueryList,
- aggregateVector);
+ super.bindExpression(fromList, subqueryList, aggregates);
TypeId leftType = leftOperand.getTypeId();
TypeId rightType = rightOperand.getTypeId();
Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryComparisonOperatorNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryComparisonOperatorNode.java?rev=1459276&r1=1459275&r2=1459276&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryComparisonOperatorNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryComparisonOperatorNode.java Thu Mar 21 12:53:57 2013
@@ -111,18 +111,18 @@ public abstract class BinaryComparisonOp
*
* @param fromList The query's FROM list
* @param subqueryList The subquery list being built as we find SubqueryNodes
- * @param aggregateVector The aggregate vector being built as we find AggregateNodes
+ * @param aggregates The aggregate list being built as we find AggregateNodes
*
* @return The new top of the expression tree.
*
* @exception StandardException Thrown on error
*/
- public ValueNode bindExpression(
- FromList fromList, SubqueryList subqueryList, List aggregateVector)
+ ValueNode bindExpression(
+ FromList fromList, SubqueryList subqueryList, List aggregates)
throws StandardException
{
- super.bindExpression(fromList, subqueryList, aggregateVector);
+ super.bindExpression(fromList, subqueryList, aggregates);
TypeCompiler leftTC = leftOperand.getTypeCompiler();
TypeCompiler rightTC = rightOperand.getTypeCompiler();
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=1459276&r1=1459275&r2=1459276&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 Mar 21 12:53:57 2013
@@ -127,19 +127,19 @@ public abstract class BinaryListOperator
* @param fromList The FROM list for the query this
* expression is in, for binding columns.
* @param subqueryList The subquery list being built as we find SubqueryNodes
- * @param aggregateVector The aggregate vector being built as we find AggregateNodes
+ * @param aggregates The aggregate list being built as we find AggregateNodes
*
* @return The new top of the expression tree.
*
* @exception StandardException Thrown on error
*/
- public ValueNode bindExpression(
- FromList fromList, SubqueryList subqueryList, List aggregateVector)
+ ValueNode bindExpression(
+ FromList fromList, SubqueryList subqueryList, List aggregates)
throws StandardException
{
- leftOperand = leftOperand.bindExpression(fromList, subqueryList, aggregateVector);
- rightOperandList.bindExpression(fromList, subqueryList, aggregateVector);
+ leftOperand = leftOperand.bindExpression(fromList, subqueryList, aggregates);
+ rightOperandList.bindExpression(fromList, subqueryList, aggregates);
/* Is there a ? parameter on the left? */
if (leftOperand.requiresTypeFromContext())
Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryLogicalOperatorNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryLogicalOperatorNode.java?rev=1459276&r1=1459275&r2=1459276&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryLogicalOperatorNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/BinaryLogicalOperatorNode.java Thu Mar 21 12:53:57 2013
@@ -65,22 +65,22 @@ abstract class BinaryLogicalOperatorNode
*
* @param fromList The query's FROM list
* @param subqueryList The subquery list being built as we find SubqueryNodes
- * @param aggregateVector The aggregate vector being built as we find AggregateNodes
+ * @param aggregates The aggregate list being built as we find AggregateNodes
*
* @return The new top of the expression tree.
*
* @exception StandardException Thrown on error
*/
- public ValueNode bindExpression(
- FromList fromList, SubqueryList subqueryList, List aggregateVector)
+ ValueNode bindExpression(
+ FromList fromList, SubqueryList subqueryList, List aggregates)
throws StandardException
{
//following is to check if we have something like "? AND 1=1" or "2>1 OR ?"
if (leftOperand.isParameterNode() || rightOperand.isParameterNode())
throw StandardException.newException( SQLState.LANG_UNTYPED_PARAMETER_IN_WHERE_CLAUSE );
- super.bindExpression(fromList, subqueryList, aggregateVector);
+ super.bindExpression(fromList, subqueryList, aggregates);
return this;
}
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=1459276&r1=1459275&r2=1459276&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 Mar 21 12:53:57 2013
@@ -272,22 +272,21 @@ public class BinaryOperatorNode extends
* @param fromList The FROM list for the query this
* expression is in, for binding columns.
* @param subqueryList The subquery list being built as we find SubqueryNodes
- * @param aggregateVector The aggregate vector being built as we find AggregateNodes
+ * @param aggregates The aggregate list being built as we find AggregateNodes
*
* @return The new top of the expression tree.
*
* @exception StandardException Thrown on error
*/
- public ValueNode bindExpression(
- FromList fromList, SubqueryList subqueryList,
- List aggregateVector)
+ ValueNode bindExpression(
+ FromList fromList, SubqueryList subqueryList, List aggregates)
throws StandardException
{
leftOperand = leftOperand.bindExpression(fromList, subqueryList,
- aggregateVector);
+ aggregates);
rightOperand = rightOperand.bindExpression(fromList, subqueryList,
- aggregateVector);
+ aggregates);
if ((operatorType == XMLEXISTS_OP) || (operatorType == XMLQUERY_OP))
return bindXMLQuery();
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=1459276&r1=1459275&r2=1459276&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 Mar 21 12:53:57 2013
@@ -188,20 +188,19 @@ public class CastNode extends ValueNode
* @param fromList The FROM list for the query this
* expression is in, for binding columns.
* @param subqueryList The subquery list being built as we find SubqueryNodes
- * @param aggregateVector The aggregate vector being built as we find AggregateNodes
+ * @param aggregates The aggregate list being built as we find AggregateNodes
*
* @return The new top of the expression tree.
*
* @exception StandardException Thrown on error
*/
- public ValueNode bindExpression(FromList fromList, SubqueryList subqueryList,
- List aggregateVector)
+ ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, List aggregates)
throws StandardException
{
castOperand = castOperand.bindExpression(
fromList, subqueryList,
- aggregateVector);
+ aggregates);
if (getTypeServices() == null) //CHAR or VARCHAR function without specifying target length
{
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=1459276&r1=1459275&r2=1459276&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 Mar 21 12:53:57 2013
@@ -147,8 +147,8 @@ public final class CharConstantNode exte
return value.getString();
}
- public ValueNode bindExpression(
- FromList fromList, SubqueryList subqueryList, List aggregateVector)
+ ValueNode bindExpression(
+ FromList fromList, SubqueryList subqueryList, List aggregates)
throws StandardException
{
//The DTD for this character constant should get its collation type
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=1459276&r1=1459275&r2=1459276&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 Mar 21 12:53:57 2013
@@ -129,18 +129,17 @@ public class CoalesceFunctionNode extend
*
* @param fromList The FROM list for the statement.
* @param subqueryList The subquery list being built as we find SubqueryNodes.
- * @param aggregateVector The aggregate vector being built as we find AggregateNodes.
+ * @param aggregates The aggregate list being built as we find AggregateNodes.
*
* @return The new top of the expression tree.
*
* @exception StandardException Thrown on error
*/
- public ValueNode bindExpression(FromList fromList, SubqueryList subqueryList,
- List aggregateVector)
+ ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, List aggregates)
throws StandardException
{
//bind all the arguments
- argumentsList.bindExpression(fromList, subqueryList, aggregateVector);
+ argumentsList.bindExpression(fromList, subqueryList, aggregates);
//There should be more than one argument
if (argumentsList.size() < 2)
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=1459276&r1=1459275&r2=1459276&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 Mar 21 12:53:57 2013
@@ -373,15 +373,14 @@ public class ColumnReference extends Val
* @param fromList The FROM list for the query this
* expression is in, for binding columns.
* @param subqueryList The subquery list being built as we find SubqueryNodes
- * @param aggregateVector The aggregate vector being built as we find AggregateNodes
+ * @param aggregates The aggregate list being built as we find AggregateNodes
*
* @return The new top of the expression tree.
*
* @exception StandardException Thrown on error
*/
- public ValueNode bindExpression(FromList fromList, SubqueryList subqueryList,
- List aggregateVector)
+ ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, List aggregates)
throws StandardException
{
ResultColumn matchingRC;
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=1459276&r1=1459275&r2=1459276&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 Mar 21 12:53:57 2013
@@ -96,14 +96,13 @@ public class ConcatenationOperatorNode e
* @exception StandardException
* thrown on failure
*/
- public ValueNode bindExpression(FromList fromList,
- SubqueryList subqueryList, List aggregateVector)
+ ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, List aggregates)
throws StandardException {
// deal with binding operands
leftOperand = leftOperand.bindExpression(fromList, subqueryList,
- aggregateVector);
+ aggregates);
rightOperand = rightOperand.bindExpression(fromList, subqueryList,
- aggregateVector);
+ aggregates);
// deal with operand parameters
/*
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=1459276&r1=1459275&r2=1459276&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 Mar 21 12:53:57 2013
@@ -196,7 +196,7 @@ public class ConditionalNode extends Val
* @exception StandardException Thrown on error.
*/
private DataTypeDescriptor findType(ValueNodeList thenElseList,
- FromList fromList, SubqueryList subqueryList, List aggregateVector)
+ FromList fromList, SubqueryList subqueryList, List aggregates)
throws StandardException
{
/* We need to "prebind" because we want the Types. Provide
@@ -205,12 +205,12 @@ public class ConditionalNode extends Val
ValueNode thenNode =
((ValueNode)thenElseList.elementAt(0)).bindExpression(
- fromList, subqueryList, aggregateVector);
+ fromList, subqueryList, aggregates);
thenElseList.setElementAt( thenNode, 0 );
ValueNode elseNode =
((ValueNode)thenElseList.elementAt(1)).bindExpression(
- fromList, subqueryList, aggregateVector);
+ fromList, subqueryList, aggregates);
thenElseList.setElementAt( elseNode, 1 );
DataTypeDescriptor thenType = thenNode.getTypeServices();
@@ -251,7 +251,7 @@ public class ConditionalNode extends Val
{
theType =
findType(((ConditionalNode)thenNode).thenElseList, fromList,
- subqueryList, aggregateVector);
+ subqueryList, aggregates);
}
if (theType != null) return theType;
@@ -261,7 +261,7 @@ public class ConditionalNode extends Val
{
theType =
findType(((ConditionalNode)elseNode).thenElseList, fromList,
- subqueryList, aggregateVector);
+ subqueryList, aggregates);
}
if (theType != null) return theType;
@@ -276,13 +276,13 @@ public class ConditionalNode extends Val
* @param castType The type to cast SQL parsed NULL's too.
* @param fromList FromList to pass on to bindExpression if recast is performed
* @param subqueryList SubqueryList to pass on to bindExpression if recast is performed
- * @param aggregateVector AggregateVector to pass on to bindExpression if recast is performed
+ * @param aggregates List of aggregates to pass on to bindExpression if recast is performed
*
* @exception StandardException Thrown on error.
*/
private void recastNullNodes(ValueNodeList thenElseList,
DataTypeDescriptor castType, FromList fromList,
- SubqueryList subqueryList, List aggregateVector)
+ SubqueryList subqueryList, List aggregates)
throws StandardException {
// Don't do anything if we couldn't find a castType.
@@ -300,12 +300,12 @@ public class ConditionalNode extends Val
// recast and rebind. findTypes would have bound as SQL CHAR.
// need to rebind here. (DERBY-3032)
thenElseList.setElementAt(recastNullNode(thenNode, castType), 0);
- ((ValueNode) thenElseList.elementAt(0)).bindExpression(fromList, subqueryList, aggregateVector);
+ ((ValueNode) thenElseList.elementAt(0)).bindExpression(fromList, subqueryList, aggregates);
// otherwise recurse on thenNode, but only if it's a conditional
} else if (isConditionalNode(thenNode)) {
recastNullNodes(((ConditionalNode)thenNode).thenElseList,
- castType,fromList, subqueryList, aggregateVector);
+ castType,fromList, subqueryList, aggregates);
}
// lastly, check if the "else" node is NULL
@@ -315,11 +315,11 @@ public class ConditionalNode extends Val
// recast and rebind. findTypes would have bound as SQL CHAR.
// need to rebind here. (DERBY-3032)
thenElseList.setElementAt(recastNullNode(elseNode, castType), 1);
- ((ValueNode) thenElseList.elementAt(1)).bindExpression(fromList, subqueryList, aggregateVector);
+ ((ValueNode) thenElseList.elementAt(1)).bindExpression(fromList, subqueryList, aggregates);
// otherwise recurse on elseNode, but only if it's a conditional
} else if (isConditionalNode(elseNode)) {
recastNullNodes(((ConditionalNode)elseNode).thenElseList,
- castType,fromList,subqueryList,aggregateVector);
+ castType,fromList,subqueryList,aggregates);
}
}
@@ -359,15 +359,14 @@ public class ConditionalNode extends Val
* @param fromList The FROM list for the query this
* expression is in, for binding columns.
* @param subqueryList The subquery list being built as we find SubqueryNodes
- * @param aggregateVector The aggregate vector being built as we find AggregateNodes
+ * @param aggregates The aggregate list being built as we find AggregateNodes
*
* @return The new top of the expression tree.
*
* @exception StandardException Thrown on error
*/
- public ValueNode bindExpression(FromList fromList, SubqueryList subqueryList,
- List aggregateVector)
+ ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, List aggregates)
throws StandardException
{
CompilerContext cc = getCompilerContext();
@@ -376,7 +375,7 @@ public class ConditionalNode extends Val
testCondition = testCondition.bindExpression(fromList,
subqueryList,
- aggregateVector);
+ aggregates);
if (thisIsNullIfNode) {
//for NULLIF(V1,V2), parser binds thenElseList.elementAt(0) to untyped NULL
@@ -401,7 +400,7 @@ public class ConditionalNode extends Val
thenElseList.setElementAt(cast,0);
thenElseList.bindExpression(fromList,
subqueryList,
- aggregateVector);
+ aggregates);
} else {
/* Following call to "findType()" and "recastNullNodes" will indirectly bind the
@@ -410,9 +409,9 @@ public class ConditionalNode extends Val
* DERBY-2986.
*/
recastNullNodes(thenElseList,
- findType(thenElseList, fromList, subqueryList, aggregateVector),fromList,
+ findType(thenElseList, fromList, subqueryList, aggregates),fromList,
subqueryList,
- aggregateVector);
+ aggregates);
}
@@ -521,7 +520,7 @@ public class ConditionalNode extends Val
getContextManager());
cast = cast.bindExpression(fromList,
subqueryList,
- aggregateVector);
+ aggregates);
thenElseList.setElementAt(cast, 0);
}
@@ -535,7 +534,7 @@ public class ConditionalNode extends Val
getContextManager());
cast = cast.bindExpression(fromList,
subqueryList,
- aggregateVector);
+ aggregates);
thenElseList.setElementAt(cast, 1);
}
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=1459276&r1=1459275&r2=1459276&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 Mar 21 12:53:57 2013
@@ -162,7 +162,7 @@ abstract class ConstantNode extends Valu
* @param fromList The FROM list for the query this
* expression is in, for binding columns.
* @param subqueryList The subquery list being built as we find SubqueryNodes
- * @param aggregateVector The aggregate vector being built as we find AggregateNodes
+ * @param aggregates The aggregate list being built as we find AggregateNodes
*
* @return The new top of the expression tree.
*
@@ -170,9 +170,8 @@ abstract class ConstantNode extends Valu
* doesn't throw this exception, it's subclasses do and hence this method
* signature here needs to have throws StandardException
*/
- public ValueNode bindExpression(
- FromList fromList, SubqueryList subqueryList,
- List aggregateVector)
+ ValueNode bindExpression(
+ FromList fromList, SubqueryList subqueryList, List aggregates)
throws StandardException
{
/*
Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CurrentDatetimeOperatorNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CurrentDatetimeOperatorNode.java?rev=1459276&r1=1459275&r2=1459276&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CurrentDatetimeOperatorNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CurrentDatetimeOperatorNode.java Thu Mar 21 12:53:57 2013
@@ -82,15 +82,14 @@ public class CurrentDatetimeOperatorNode
* 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
+ * @param aggregates The aggregate list 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,
- List aggregateVector)
+ ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, List aggregates)
throws StandardException
{
checkReliability( methodName[whichType], CompilerContext.DATETIME_ILLEGAL );
Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CurrentRowLocationNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CurrentRowLocationNode.java?rev=1459276&r1=1459275&r2=1459276&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CurrentRowLocationNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CurrentRowLocationNode.java Thu Mar 21 12:53:57 2013
@@ -53,15 +53,14 @@ public class CurrentRowLocationNode exte
* @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
- * @param aggregateVector The aggregate vector being built as we find AggregateNodes
+ * @param aggregates The aggregate list being built as we find AggregateNodes
*
* @return The new top of the expression tree.
*
* @exception StandardException Thrown on error
*/
- public ValueNode bindExpression(FromList fromList, SubqueryList subqueryList,
- List aggregateVector)
+ ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, List aggregates)
throws StandardException
{
setType(new DataTypeDescriptor(TypeId.getBuiltInTypeId(TypeId.REF_NAME),
Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DB2LengthOperatorNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DB2LengthOperatorNode.java?rev=1459276&r1=1459275&r2=1459276&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DB2LengthOperatorNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DB2LengthOperatorNode.java Thu Mar 21 12:53:57 2013
@@ -64,19 +64,18 @@ public final class DB2LengthOperatorNode
*
* @param fromList The query's FROM list
* @param subqueryList The subquery list being built as we find SubqueryNodes
- * @param aggregateVector The aggregate vector being built as we find AggregateNodes
+ * @param aggregates The aggregate list being built as we find AggregateNodes
*
* @return The new top of the expression tree.
*
* @exception StandardException Thrown on error
*/
- public ValueNode bindExpression(
- FromList fromList, SubqueryList subqueryList,
- List aggregateVector)
+ ValueNode bindExpression(
+ FromList fromList, SubqueryList subqueryList, List aggregates)
throws StandardException
{
- bindOperand( fromList, subqueryList, aggregateVector);
+ bindOperand( fromList, subqueryList, aggregates);
// This operator is not allowed on XML types.
TypeId operandType = operand.getTypeId();
Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DefaultNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DefaultNode.java?rev=1459276&r1=1459275&r2=1459276&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DefaultNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DefaultNode.java Thu Mar 21 12:53:57 2013
@@ -142,14 +142,13 @@ public class DefaultNode extends ValueN
* @param fromList The FROM list for the query this
* expression is in, for binding columns.
* @param subqueryList The subquery list being built as we find SubqueryNodes
- * @param aggregateVector The aggregate vector being built as we find AggregateNodes
+ * @param aggregates The aggregate list being built as we find AggregateNodes
*
* @return The new top of the expression tree.
*
* @exception StandardException Thrown on failure
*/
- public ValueNode bindExpression(FromList fromList, SubqueryList subqueryList,
- List aggregateVector)
+ ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, List aggregates)
throws StandardException
{
ColumnDescriptor cd;
@@ -196,7 +195,7 @@ public class DefaultNode extends ValueN
return defaultTree.bindExpression(
fromList,
subqueryList,
- aggregateVector);
+ aggregates);
}
else
{
Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DeleteNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DeleteNode.java?rev=1459276&r1=1459275&r2=1459276&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DeleteNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DeleteNode.java Thu Mar 21 12:53:57 2013
@@ -766,7 +766,6 @@ public class DeleteNode extends DMLModSt
SelectNode resultSet = (SelectNode) nodeFactory.getNode(
C_NodeTypes.SELECT_NODE,
null,
- null, /* AGGREGATE list */
fromList, /* FROM list */
whereClause, /* WHERE clause */
null, /* GROUP BY list */
@@ -817,7 +816,6 @@ public class DeleteNode extends DMLModSt
SelectNode resultSet = (SelectNode) nodeFactory.getNode(
C_NodeTypes.SELECT_NODE,
getSetClause(tableName, cdl),
- null, /* AGGREGATE list */
fromList, /* FROM list */
whereClause, /* WHERE clause */
null, /* GROUP BY list */
Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ExtractOperatorNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ExtractOperatorNode.java?rev=1459276&r1=1459275&r2=1459276&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ExtractOperatorNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ExtractOperatorNode.java Thu Mar 21 12:53:57 2013
@@ -73,24 +73,21 @@ public class ExtractOperatorNode extends
*
* @param fromList The query's FROM list
* @param subqueryList The subquery list being built as we find SubqueryNodes
- * @param aggregateVector The aggregate vector being built as we find AggregateNodes
+ * @param aggregates The aggregate list being built as we find AggregateNodes
*
* @return The new top of the expression tree.
*
* @exception StandardException Thrown on error
*/
- public ValueNode bindExpression(
- FromList fromList,
- SubqueryList subqueryList,
- List aggregateVector)
+ ValueNode bindExpression(
+ FromList fromList, SubqueryList subqueryList, List aggregates)
throws StandardException
{
int operandType;
TypeId opTypeId;
- bindOperand(fromList, subqueryList,
- aggregateVector);
+ bindOperand(fromList, subqueryList, aggregates);
opTypeId = operand.getTypeId();
operandType = opTypeId.getJDBCTypeId();
Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromVTI.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromVTI.java?rev=1459276&r1=1459275&r2=1459276&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromVTI.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromVTI.java Thu Mar 21 12:53:57 2013
@@ -539,10 +539,8 @@ public class FromVTI extends FromTable i
* Correlated subqueries are not allowed as parameters to
* a VTI, so pass an empty FromList.
*/
- ArrayList aggregateVector = new ArrayList();
- methodCall.bindExpression(fromListParam,
- subqueryList,
- aggregateVector);
+ ArrayList aggregates = new ArrayList();
+ methodCall.bindExpression(fromListParam, subqueryList, aggregates);
// Is the parameter list to the constructor valid for a VTI?
methodParms = methodCall.getMethodParms();
@@ -902,7 +900,7 @@ public class FromVTI extends FromTable i
* These CRs will have uninitialized column and table numbers.
*/
List colRefs = getNodesFromParameters(ColumnReference.class);
- ArrayList aggregateVector = null;
+ ArrayList aggregates = null;
for (Iterator it = colRefs.iterator(); it.hasNext(); )
{
ColumnReference ref = (ColumnReference) it.next();
@@ -963,13 +961,13 @@ public class FromVTI extends FromTable i
if (ref.getTableNumber() == -1)
{
// we need a fake agg list
- if (aggregateVector == null)
+ if (aggregates == null)
{
- aggregateVector = new ArrayList();
+ aggregates = new ArrayList();
}
ref.bindExpression(fromListParam,
subqueryList,
- aggregateVector);
+ aggregates);
}
}
}
Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/GenerationClauseNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/GenerationClauseNode.java?rev=1459276&r1=1459275&r2=1459276&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/GenerationClauseNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/GenerationClauseNode.java Thu Mar 21 12:53:57 2013
@@ -94,11 +94,11 @@ public class GenerationClauseNode extend
/**
* Binding the generation clause.
*/
- public ValueNode bindExpression
- ( FromList fromList, SubqueryList subqueryList, List aggregateVector )
+ ValueNode bindExpression
+ ( FromList fromList, SubqueryList subqueryList, List aggregates)
throws StandardException
{
- _boundExpression = _generationExpression.bindExpression( fromList, subqueryList, aggregateVector );
+ _boundExpression = _generationExpression.bindExpression( fromList, subqueryList, aggregates );
return _boundExpression;
}
Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/GetCurrentConnectionNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/GetCurrentConnectionNode.java?rev=1459276&r1=1459275&r2=1459276&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/GetCurrentConnectionNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/GetCurrentConnectionNode.java Thu Mar 21 12:53:57 2013
@@ -71,14 +71,12 @@ public final class GetCurrentConnectionN
*
* @param fromList The query's FROM list
* @param subqueryList The subquery list being built as we find SubqueryNodes
- * @param aggregateVector The aggregate vector being built as we find AggregateNodes
+ * @param aggregates The aggregate list being built as we find AggregateNodes
*
* @exception StandardException Thrown on error
*/
-
- public JavaValueNode bindExpression(
- FromList fromList, SubqueryList subqueryList,
- List aggregateVector)
+ JavaValueNode bindExpression(
+ FromList fromList, SubqueryList subqueryList, List aggregates)
throws StandardException
{
return this;
Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/GroupByColumn.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/GroupByColumn.java?rev=1459276&r1=1459275&r2=1459276&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/GroupByColumn.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/GroupByColumn.java Thu Mar 21 12:53:57 2013
@@ -89,23 +89,22 @@ public class GroupByColumn extends Order
* @param fromList The FROM list to use for binding
* @param subqueryList The SubqueryList we are building as we hit
* SubqueryNodes.
- * @param aggregateVector The aggregate vector we build as we hit
+ * @param aggregates The aggregate list we build as we hit
* AggregateNodes.
*
* @exception StandardException Thrown on error
*/
-
- public void bindExpression(
+ void bindExpression(
FromList fromList,
SubqueryList subqueryList,
- List aggregateVector)
+ List aggregates)
throws StandardException
{
/* Bind the ColumnReference to the FromList */
int previousReliability = orReliability( CompilerContext.GROUP_BY_RESTRICTION );
columnExpression = (ValueNode) columnExpression.bindExpression(fromList,
subqueryList,
- aggregateVector);
+ aggregates);
getCompilerContext().setReliability( previousReliability );
// Verify that we can group on the column
Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/GroupByList.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/GroupByList.java?rev=1459276&r1=1459275&r2=1459276&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/GroupByList.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/GroupByList.java Thu Mar 21 12:53:57 2013
@@ -97,11 +97,11 @@ public class GroupByList extends Ordered
* expressions in SELECT's RCL.
*
* @param select The SelectNode
- * @param aggregateVector The aggregate vector being built as we find AggregateNodes
+ * @param aggregates The aggregate list being built as we find AggregateNodes
*
* @exception StandardException Thrown on error
*/
- void bindGroupByColumns(SelectNode select, List aggregateVector)
+ void bindGroupByColumns(SelectNode select, List aggregates)
throws StandardException
{
FromList fromList = select.getFromList();
@@ -124,7 +124,7 @@ public class GroupByList extends Ordered
{
GroupByColumn groupByCol = (GroupByColumn) elementAt(index);
groupByCol.bindExpression(fromList,
- dummySubqueryList, aggregateVector);
+ dummySubqueryList, aggregates);
}
Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/GroupByNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/GroupByNode.java?rev=1459276&r1=1459275&r2=1459276&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/GroupByNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/GroupByNode.java Thu Mar 21 12:53:57 2013
@@ -84,7 +84,7 @@ public class GroupByNode extends SingleC
* The list of all aggregates in the query block
* that contains this group by.
*/
- private List aggregateVector;
+ private List aggregates;
/**
* Information that is used at execution time to
@@ -116,7 +116,7 @@ public class GroupByNode extends SingleC
*
* @param bottomPR The child FromTable
* @param groupingList The groupingList
- * @param aggregateVector The vector of aggregates from
+ * @param aggregates The list of aggregates from
* the query block. Since aggregation is done
* at the same time as grouping, we need them
* here.
@@ -130,7 +130,7 @@ public class GroupByNode extends SingleC
public void init(
Object bottomPR,
Object groupingList,
- Object aggregateVector,
+ Object aggregates,
Object havingClause,
Object havingSubquerys,
Object tableProperties,
@@ -144,10 +144,10 @@ public class GroupByNode extends SingleC
/* Group by without aggregates gets xformed into distinct */
if (SanityManager.DEBUG)
{
-// Aggregage vector can be null if we have a having clause.
+// Aggregates can be null if we have a having clause.
// select c1 from t1 group by c1 having c1 > 1;
-// SanityManager.ASSERT(((List) aggregateVector).size() > 0,
-// "aggregateVector expected to be non-empty");
+// SanityManager.ASSERT(((List) aggregates).size() > 0,
+// "aggregates expected to be non-empty");
if (!(childResult instanceof Optimizable))
{
SanityManager.THROWASSERT("childResult, " + childResult.getClass().getName() +
@@ -162,7 +162,7 @@ public class GroupByNode extends SingleC
ResultColumnList newBottomRCL;
this.groupingList = (GroupByList) groupingList;
- this.aggregateVector = (List) aggregateVector;
+ this.aggregates = (List) aggregates;
this.parent = this;
/*
@@ -252,7 +252,7 @@ public class GroupByNode extends SingleC
*/
private void addDistinctAggregatesToOrderBy()
{
- int numDistinct = numDistinctAggregates(aggregateVector);
+ int numDistinct = numDistinctAggregates(aggregates);
if (numDistinct != 0)
{
if (SanityManager.DEBUG)
@@ -465,8 +465,7 @@ public class GroupByNode extends SingleC
// DERBY-4071 Don't substitute quite yet; we need the AggrateNodes
// undisturbed until after we have had the chance to build the
// other columns. (The AggrateNodes are shared via an alias from
- // aggregateVector and from the expression tree under
- // havingClause).
+ // aggregates and from the expression tree under havingClause).
}
return havingRefsToSubstitute;
}
@@ -498,7 +497,7 @@ public class GroupByNode extends SingleC
* <LI> reset the top PR ref to point to the new GROUPBY
* RC</LI></UL>
*
- * For each aggregate in aggregateVector <UL>
+ * For each aggregate in {@code aggregates} <UL>
* <LI> create RC in FROM TABLE. Fill it with
* aggs Operator.
* <LI> create RC in FROM TABLE for agg result</LI>
@@ -607,7 +606,6 @@ public class GroupByNode extends SingleC
private void addAggregateColumns() throws StandardException
{
DataDictionary dd = getDataDictionary();
- AggregateNode aggregate = null;
ColumnReference newColumnRef;
ResultColumn newRC;
ResultColumn tmpRC;
@@ -656,10 +654,10 @@ public class GroupByNode extends SingleC
/*
** For each aggregate
*/
- int alSize = aggregateVector.size();
+ int alSize = aggregates.size();
for (int index = 0; index < alSize; index++)
{
- aggregate = (AggregateNode) aggregateVector.get(index);
+ AggregateNode aggregate = (AggregateNode) aggregates.get(index);
/*
** AGG RESULT: Set the aggregate result to null in the
@@ -896,14 +894,13 @@ public class GroupByNode extends SingleC
{
super.printSubNodes(depth);
- printLabel(depth, "aggregateVector:\n");
+ printLabel(depth, "aggregates:\n");
- for (int i=0; i < aggregateVector.size(); i++) {
- AggregateNode agg =
- (AggregateNode)aggregateVector.get(i);
- debugPrint(formatNodeString("[" + i + "]:", depth + 1));
- agg.treePrint(depth + 1);
- }
+ for (int i = 0; i < aggregates.size(); i++) {
+ AggregateNode agg = (AggregateNode) aggregates.get(i);
+ debugPrint(formatNodeString("[" + i + "]:", depth + 1));
+ agg.treePrint(depth + 1);
+ }
if (groupingList != null) {
printLabel(depth, "groupingList: ");
@@ -1234,9 +1231,9 @@ public class GroupByNode extends SingleC
*/
if (groupingList == null)
{
- if (aggregateVector.size() == 1)
+ if (aggregates.size() == 1)
{
- AggregateNode an = (AggregateNode) aggregateVector.get(0);
+ AggregateNode an = (AggregateNode) aggregates.get(0);
AggregateDefinition ad = an.getAggregateDefinition();
if (ad instanceof MaxMinAggregateDefinition)
{
Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/HalfOuterJoinNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/HalfOuterJoinNode.java?rev=1459276&r1=1459275&r2=1459276&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/HalfOuterJoinNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/HalfOuterJoinNode.java Thu Mar 21 12:53:57 2013
@@ -732,7 +732,7 @@ private boolean isNullRejecting (
getContextManager());
ij.setTableNumber(tableNumber);
ij.setSubqueryList(subqueryList);
- ij.setAggregateVector(aggregateVector);
+ ij.setAggregates(aggregates);
return ij;
}
}
Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/IsNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/IsNode.java?rev=1459276&r1=1459275&r2=1459276&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/IsNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/IsNode.java Thu Mar 21 12:53:57 2013
@@ -60,19 +60,18 @@ public class IsNode extends BinaryLogica
*
* @param fromList The query's FROM list
* @param subqueryList The subquery list being built as we find SubqueryNodes
- * @param aggregateVector The aggregate vector being built as we find AggregateNodes
+ * @param aggregates The aggregate list being built as we find AggregateNodes
*
* @return The new top of the expression tree.
*
* @exception StandardException Thrown on error
*/
- public ValueNode bindExpression(
- FromList fromList, SubqueryList subqueryList,
- List aggregateVector)
+ ValueNode bindExpression(
+ FromList fromList, SubqueryList subqueryList, List aggregates)
throws StandardException
{
- super.bindExpression(fromList, subqueryList, aggregateVector);
+ super.bindExpression(fromList, subqueryList, aggregates);
leftOperand.checkIsBoolean();
rightOperand.checkIsBoolean();
Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/JavaToSQLValueNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/JavaToSQLValueNode.java?rev=1459276&r1=1459275&r2=1459276&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/JavaToSQLValueNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/JavaToSQLValueNode.java Thu Mar 21 12:53:57 2013
@@ -214,14 +214,14 @@ public class JavaToSQLValueNode extends
* expression is in, for binding columns.
* @param subqueryList The subquery list being built as we find
* SubqueryNodes
- * @param aggregateVector The aggregate vector being built as we find AggregateNodes
+ * @param aggregates The aggregate list being built as we find
+ * AggregateNodes
*
* @return The new top of the expression tree.
*
* @exception StandardException Thrown on error
*/
- public ValueNode bindExpression(FromList fromList, SubqueryList subqueryList,
- List aggregateVector)
+ ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, List aggregates)
throws StandardException
{
// method invocations are not allowed in ADD TABLE clauses.
@@ -229,7 +229,7 @@ public class JavaToSQLValueNode extends
javaNode.checkReliability(this);
/* Bind the expression under us */
- javaNode = javaNode.bindExpression(fromList, subqueryList, aggregateVector);
+ javaNode = javaNode.bindExpression(fromList, subqueryList, aggregates);
if ( javaNode instanceof StaticMethodCallNode )
{
@@ -237,7 +237,7 @@ public class JavaToSQLValueNode extends
if ( agg != null )
{
- return agg.bindExpression( fromList, subqueryList, aggregateVector );
+ return agg.bindExpression( fromList, subqueryList, aggregates );
}
}
Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/JavaValueNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/JavaValueNode.java?rev=1459276&r1=1459275&r2=1459276&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/JavaValueNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/JavaValueNode.java Thu Mar 21 12:53:57 2013
@@ -215,8 +215,7 @@ abstract class JavaValueNode extends Que
*
* @exception StandardException Thrown on error
*/
- abstract JavaValueNode bindExpression(FromList fromList, SubqueryList subqueryList,
- List aggregateVector)
+ abstract JavaValueNode bindExpression(FromList fromList, SubqueryList subqueryList, List aggregates)
throws StandardException;
/**
* @see ValueNode#preprocess
Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/JoinNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/JoinNode.java?rev=1459276&r1=1459275&r2=1459276&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/JoinNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/JoinNode.java Thu Mar 21 12:53:57 2013
@@ -87,7 +87,7 @@ public class JoinNode extends TableOpera
private PredicateList rightPredicateList;
protected boolean flattenableJoin = true;
- List aggregateVector;
+ List aggregates;
SubqueryList subqueryList;
ValueNode joinClause;
boolean joinClauseNormalized;
@@ -808,7 +808,7 @@ public class JoinNode extends TableOpera
subqueryList = (SubqueryList) getNodeFactory().getNode(
C_NodeTypes.SUBQUERY_LIST,
getContextManager());
- aggregateVector = new ArrayList();
+ aggregates = new ArrayList();
CompilerContext cc = getCompilerContext();
@@ -830,7 +830,7 @@ public class JoinNode extends TableOpera
int previousReliability = orReliability( CompilerContext.ON_CLAUSE_RESTRICTION );
joinClause = joinClause.bindExpression(
fromList, subqueryList,
- aggregateVector);
+ aggregates);
cc.setReliability( previousReliability );
// SQL 2003, section 7.7 SR 5
@@ -839,10 +839,10 @@ public class JoinNode extends TableOpera
/*
** We cannot have aggregates in the ON clause.
** In the future, if we relax this, we'll need
- ** to be able to pass the aggregateVector up
+ ** to be able to pass the list of aggregates up
** the tree.
*/
- if (aggregateVector.size() > 0)
+ if (!aggregates.isEmpty())
{
throw StandardException.newException(SQLState.LANG_NO_AGGREGATES_IN_ON_CLAUSE);
}
@@ -882,7 +882,7 @@ public class JoinNode extends TableOpera
getContextManager());
leftCR = (ColumnReference) leftCR.bindExpression(
fromListParam, subqueryList,
- aggregateVector);
+ aggregates);
fromListParam.removeElementAt(0);
/* Create and bind the right CR */
@@ -894,7 +894,7 @@ public class JoinNode extends TableOpera
getContextManager());
rightCR = (ColumnReference) rightCR.bindExpression(
fromListParam, subqueryList,
- aggregateVector);
+ aggregates);
fromListParam.removeElementAt(0);
/* Create and insert the new = condition */
@@ -1952,9 +1952,9 @@ public class JoinNode extends TableOpera
this.subqueryList = subqueryList;
}
- void setAggregateVector(List aggregateVector)
+ void setAggregates(List aggregates)
{
- this.aggregateVector = aggregateVector;
+ this.aggregates = aggregates;
}
/**
Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/LengthOperatorNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/LengthOperatorNode.java?rev=1459276&r1=1459275&r2=1459276&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/LengthOperatorNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/LengthOperatorNode.java Thu Mar 21 12:53:57 2013
@@ -75,22 +75,20 @@ public final class LengthOperatorNode ex
*
* @param fromList The query's FROM list
* @param subqueryList The subquery list being built as we find SubqueryNodes
- * @param aggregateVector The aggregate vector being built as we find AggregateNodes
+ * @param aggregates The aggregate list being built as we find AggregateNodes
*
* @return The new top of the expression tree.
*
* @exception StandardException Thrown on error
*/
- public ValueNode bindExpression(
- FromList fromList, SubqueryList subqueryList,
- List aggregateVector)
+ ValueNode bindExpression(
+ FromList fromList, SubqueryList subqueryList, List aggregates)
throws StandardException
{
TypeId operandType;
- bindOperand(fromList, subqueryList,
- aggregateVector);
+ bindOperand(fromList, subqueryList, aggregates);
/*
** Check the type of the operand - this function is allowed only on
Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/LikeEscapeOperatorNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/LikeEscapeOperatorNode.java?rev=1459276&r1=1459275&r2=1459276&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/LikeEscapeOperatorNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/LikeEscapeOperatorNode.java Thu Mar 21 12:53:57 2013
@@ -140,13 +140,11 @@ public final class LikeEscapeOperatorNod
*
* @exception StandardException thrown on failure
*/
- public ValueNode bindExpression(
- FromList fromList,
- SubqueryList subqueryList,
- List aggregateVector)
+ ValueNode bindExpression(
+ FromList fromList, SubqueryList subqueryList, List aggregates)
throws StandardException
{
- super.bindExpression(fromList, subqueryList, aggregateVector);
+ super.bindExpression(fromList, subqueryList, aggregates);
String pattern = null;
@@ -405,7 +403,7 @@ public final class LikeEscapeOperatorNod
equals = (BinaryComparisonOperatorNode)
equals.bindExpression(
- fromList, subqueryList, aggregateVector);
+ fromList, subqueryList, aggregates);
// create new and node and hook in "equals" the new "=' node
//
Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/MethodCallNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/MethodCallNode.java?rev=1459276&r1=1459275&r2=1459276&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/MethodCallNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/MethodCallNode.java Thu Mar 21 12:53:57 2013
@@ -303,13 +303,12 @@ abstract class MethodCallNode extends Ja
* @param fromList The FROM list for the query this
* expression is in, for binding columns.
* @param subqueryList The subquery list being built as we find SubqueryNodes
- * @param aggregateVector The aggregate vector being built as we find AggregateNodes
+ * @param aggregates The aggregate list being built as we find AggregateNodes
*
* @exception StandardException Thrown on error
*/
final void bindParameters(
- FromList fromList, SubqueryList subqueryList,
- List aggregateVector)
+ FromList fromList, SubqueryList subqueryList, List aggregates)
throws StandardException
{
/* Bind the parameters */
@@ -329,7 +328,7 @@ abstract class MethodCallNode extends Ja
{
methodParms[parm] =
methodParms[parm].bindExpression(
- fromList, subqueryList, aggregateVector);
+ fromList, subqueryList, aggregates);
if (routineInfo == null)
signature[ parm ] = methodParms[ parm ].getJSQLType();
Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/NewInvocationNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/NewInvocationNode.java?rev=1459276&r1=1459275&r2=1459276&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/NewInvocationNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/NewInvocationNode.java Thu Mar 21 12:53:57 2013
@@ -210,21 +210,19 @@ public class NewInvocationNode extends M
* as well as figuring out what the return type is for this expression.
*
* @param fromList The FROM list for the query this
- * expression is in, for binding columns.
- * @param subqueryList The subquery list being built as we find SubqueryNodes
- * @param aggregateVector The aggregate vector being built as we find AggregateNodes
+ * expression is in, for binding columns.
+ * @param subqueryList The subquery list being built as we find SubqueryNodes
+ * @param aggregates The aggregate list being built as we find AggregateNodes
*
* @return Nothing
*
* @exception StandardException Thrown on error
*/
-
- public JavaValueNode bindExpression(
- FromList fromList, SubqueryList subqueryList,
- List aggregateVector)
+ JavaValueNode bindExpression(
+ FromList fromList, SubqueryList subqueryList, List aggregates)
throws StandardException
{
- bindParameters(fromList, subqueryList, aggregateVector);
+ bindParameters(fromList, subqueryList, aggregates);
verifyClassExist(javaClassName);
/*
Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/NextSequenceNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/NextSequenceNode.java?rev=1459276&r1=1459275&r2=1459276&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/NextSequenceNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/NextSequenceNode.java Thu Mar 21 12:53:57 2013
@@ -59,13 +59,12 @@ public class NextSequenceNode extends Va
* @param fromList The FROM list for the query this
* expression is in, for binding columns.
* @param subqueryList The subquery list being built as we find SubqueryNodes
- * @param aggregateVector The aggregate vector being built as we find AggregateNodes
+ * @param aggregates The aggregate list being built as we find AggregateNodes
* @return The new top of the expression tree.
* @throws StandardException Thrown on error
*/
- public ValueNode bindExpression(
- FromList fromList, SubqueryList subqueryList,
- List aggregateVector, boolean forQueryRewrite)
+ ValueNode bindExpression(
+ FromList fromList, SubqueryList subqueryList, List aggregates, boolean forQueryRewrite)
throws StandardException
{
//
Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/NonStaticMethodCallNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/NonStaticMethodCallNode.java?rev=1459276&r1=1459275&r2=1459276&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/NonStaticMethodCallNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/NonStaticMethodCallNode.java Thu Mar 21 12:53:57 2013
@@ -102,18 +102,16 @@ public class NonStaticMethodCallNode ext
* as well as figuring out what the return type is for this expression.
*
* @param fromList The FROM list for the query this
- * expression is in, for binding columns.
- * @param subqueryList The subquery list being built as we find SubqueryNodes
- * @param aggregateVector The aggregate vector being built as we find AggregateNodes
+ * expression is in, for binding columns.
+ * @param subqueryList The subquery list being built as we find SubqueryNodes
+ * @param aggregates The aggregate list being built as we find AggregateNodes
*
* @return this
*
* @exception StandardException Thrown on error
*/
-
- public JavaValueNode bindExpression(
- FromList fromList, SubqueryList subqueryList,
- List aggregateVector)
+ JavaValueNode bindExpression(
+ FromList fromList, SubqueryList subqueryList, List aggregates)
throws StandardException
{
/* NULL and ? not allowed as receivers */
@@ -143,13 +141,13 @@ public class NonStaticMethodCallNode ext
}
}
- bindParameters(fromList, subqueryList, aggregateVector);
+ bindParameters(fromList, subqueryList, aggregates);
/* Now we don't allow an alias static method call here (that has to
* use :: sign for any static call). If it gets here, it can't be
* alias static method call.
*/
- receiver = receiver.bindExpression(fromList, subqueryList, aggregateVector);
+ receiver = receiver.bindExpression(fromList, subqueryList, aggregates);
// Don't allow LOB types to be used as a method receiver
String type = receiver.getJSQLType().getSQLType().getTypeId().getSQLTypeName();
Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/OrNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/OrNode.java?rev=1459276&r1=1459275&r2=1459276&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/OrNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/OrNode.java Thu Mar 21 12:53:57 2013
@@ -64,19 +64,18 @@ public class OrNode extends BinaryLogica
*
* @param fromList The query's FROM list
* @param subqueryList The subquery list being built as we find SubqueryNodes
- * @param aggregateVector The aggregate vector being built as we find AggregateNodes
+ * @param aggregates The aggregate list being built as we find AggregateNodes
*
* @return The new top of the expression tree.
*
* @exception StandardException Thrown on error
*/
- public ValueNode bindExpression(
- FromList fromList, SubqueryList subqueryList,
- List aggregateVector)
+ ValueNode bindExpression(
+ FromList fromList, SubqueryList subqueryList, List aggregates)
throws StandardException
{
- super.bindExpression(fromList, subqueryList, aggregateVector);
+ super.bindExpression(fromList, subqueryList, aggregates);
postBindFixup();
return this;
}
Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ParameterNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ParameterNode.java?rev=1459276&r1=1459275&r2=1459276&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ParameterNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ParameterNode.java Thu Mar 21 12:53:57 2013
@@ -207,16 +207,15 @@ public class ParameterNode extends Value
* @param fromList The FROM list for the query this
* expression is in, for binding columns.
* @param subqueryList The subquery list being built as we find SubqueryNodes
- * @param aggregateVector The aggregate vector being built as we find AggregateNodes
+ * @param aggregates The aggregate list being built as we find AggregateNodes
*
* @return The new top of the expression tree.
*
* @exception StandardException Thrown on error
*/
- public ValueNode bindExpression(
- FromList fromList, SubqueryList subqueryList,
- List aggregateVector)
+ ValueNode bindExpression(
+ FromList fromList, SubqueryList subqueryList, List aggregates)
throws StandardException
{
checkReliability( "?", CompilerContext.UNNAMED_PARAMETER_ILLEGAL );
Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ResultColumn.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ResultColumn.java?rev=1459276&r1=1459275&r2=1459276&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ResultColumn.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ResultColumn.java Thu Mar 21 12:53:57 2013
@@ -695,15 +695,14 @@ public class ResultColumn extends ValueN
* @param fromList The FROM list for the query this
* expression is in, for binding columns.
* @param subqueryList The subquery list being built as we find SubqueryNodes
- * @param aggregateVector The aggregate vector being built as we find AggregateNodes
+ * @param aggregates The aggregate list being built as we find AggregateNodes
*
* @return The new top of the expression tree.
*
* @exception StandardException Thrown on error
*/
- public ValueNode bindExpression(FromList fromList, SubqueryList subqueryList,
- List aggregateVector)
+ ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, List aggregates)
throws StandardException
{
/*
@@ -734,7 +733,7 @@ public class ResultColumn extends ValueN
}
setExpression( expression.bindExpression(fromList, subqueryList,
- aggregateVector) );
+ aggregates) );
if (expression instanceof ColumnReference)
{
Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ResultColumnList.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ResultColumnList.java?rev=1459276&r1=1459275&r2=1459276&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ResultColumnList.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ResultColumnList.java Thu Mar 21 12:53:57 2013
@@ -811,13 +811,12 @@ public class ResultColumnList extends Qu
* @param fromList The FROM list for the query this
* expression is in, for binding columns.
* @param subqueryList The subquery list being built as we find SubqueryNodes
- * @param aggregateVector The aggregate vector being built as we find AggregateNodes
+ * @param aggregates The aggregate list being built as we find AggregateNodes
*
* @exception StandardException Thrown on error
*/
- public void bindExpressions(
- FromList fromList, SubqueryList subqueryList,
- List aggregateVector)
+ void bindExpressions(
+ FromList fromList, SubqueryList subqueryList, List aggregates)
throws StandardException
{
/* First we expand the *'s in the result column list */
@@ -830,7 +829,7 @@ public class ResultColumnList extends Qu
ValueNode vn = (ValueNode) elementAt(index);
vn = ((ResultColumn) vn ).bindExpression(
fromList, subqueryList,
- aggregateVector);
+ aggregates);
setElementAt(vn, index);
}
}
Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ResultSetNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ResultSetNode.java?rev=1459276&r1=1459275&r2=1459276&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ResultSetNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ResultSetNode.java Thu Mar 21 12:53:57 2013
@@ -1868,15 +1868,16 @@ public abstract class ResultSetNode exte
*
* @return number of aggregates
*/
- protected static final int numDistinctAggregates(List aggregateVector)
+ static int numDistinctAggregates(List aggregates)
{
int count = 0;
- int size = aggregateVector.size();
+ int size = aggregates.size();
for (int index = 0; index < size; index++)
{
- count += (((AggregateNode) aggregateVector.get(index)).isDistinct() == true) ?
- 1 : 0;
+ if (((AggregateNode) aggregates.get(index)).isDistinct()) {
+ count++;
+ }
}
return count;
Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/RowNumberFunctionNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/RowNumberFunctionNode.java?rev=1459276&r1=1459275&r2=1459276&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/RowNumberFunctionNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/RowNumberFunctionNode.java Thu Mar 21 12:53:57 2013
@@ -55,13 +55,11 @@ public final class RowNumberFunctionNode
* ValueNode override.
* @see ValueNode#bindExpression
*/
- public ValueNode bindExpression(
- FromList fromList,
- SubqueryList subqueryList,
- List aggregateVector)
+ ValueNode bindExpression(
+ FromList fromList, SubqueryList subqueryList, List aggregates)
throws StandardException
{
- super.bindExpression(fromList, subqueryList, aggregateVector);
+ super.bindExpression(fromList, subqueryList, aggregates);
return this;
}
}
Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/RowResultSetNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/RowResultSetNode.java?rev=1459276&r1=1459275&r2=1459276&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/RowResultSetNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/RowResultSetNode.java Thu Mar 21 12:53:57 2013
@@ -60,7 +60,7 @@ import org.apache.derby.iapi.services.cl
public class RowResultSetNode extends FromTable
{
SubqueryList subquerys;
- private List aggregateVector;
+ private List aggregates;
OrderByList orderByList;
ValueNode offset; // OFFSET n ROWS
ValueNode fetchFirst; // FETCH FIRST n ROWS ONLY
@@ -231,7 +231,7 @@ public class RowResultSetNode extends Fr
C_NodeTypes.SUBQUERY_LIST,
getContextManager());
- aggregateVector = new ArrayList();
+ aggregates = new ArrayList();
/* Verify that there are no DEFAULTs in the RCL.
* DEFAULT is only valid for an insert, and it has
@@ -260,11 +260,11 @@ public class RowResultSetNode extends Fr
setLevel(nestingLevel);
fromListParam.insertElementAt(this, 0);
resultColumns.bindExpressions(fromListParam, subquerys,
- aggregateVector);
+ aggregates);
// Pop ourselves back out of the FROM list
fromListParam.removeElementAt(0);
- if (!aggregateVector.isEmpty())
+ if (!aggregates.isEmpty())
{
throw StandardException.newException(SQLState.LANG_NO_AGGREGATES_IN_WHERE_CLAUSE);
}
@@ -566,8 +566,7 @@ public class RowResultSetNode extends Fr
return false;
}
- if ((aggregateVector != null) &&
- (aggregateVector.size() > 0))
+ if ((aggregates != null) && !aggregates.isEmpty())
{
return false;
}
Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SQLToJavaValueNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SQLToJavaValueNode.java?rev=1459276&r1=1459275&r2=1459276&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SQLToJavaValueNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SQLToJavaValueNode.java Thu Mar 21 12:53:57 2013
@@ -175,24 +175,22 @@ public class SQLToJavaValueNode extends
* as well as figuring out what the return type is for this expression.
*
* @param fromList The FROM list for the query this
- * expression is in, for binding columns.
- * @param subqueryList The subquery list being built as we find
- * SubqueryNodes
- * @param aggregateVector The aggregate vector being built as we find AggregateNodes
+ * expression is in, for binding columns.
+ * @param subqueryList The subquery list being built as we find
+ * SubqueryNodes
+ * @param aggregates The aggregate list being built as we find AggregateNodes
*
* @return this
*
* @exception StandardException Thrown on error
*/
-
- public JavaValueNode bindExpression(
- FromList fromList, SubqueryList subqueryList,
- List aggregateVector)
+ JavaValueNode bindExpression(
+ FromList fromList, SubqueryList subqueryList, List aggregates)
throws StandardException
{
/* Bind the expression under us */
value = value.bindExpression(fromList, subqueryList,
- aggregateVector);
+ aggregates);
return this;
}