db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r430173 - in /db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile: FromList.java FromTable.java SetOperatorNode.java TableOperatorNode.java
Date Wed, 09 Aug 2006 22:48:09 GMT
Author: djd
Date: Wed Aug  9 15:48:08 2006
New Revision: 430173

URL: http://svn.apache.org/viewvc?rev=430173&view=rev
Log:
DERBY-1315 (minor cleanup) Remove a couple of unused fields and associated methods to save
runtime space.
Reduce the scope of some fields and methods to better understand their use.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromList.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromTable.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/TableOperatorNode.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromList.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromList.java?rev=430173&r1=430172&r2=430173&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromList.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromList.java Wed Aug
 9 15:48:08 2006
@@ -441,7 +441,6 @@
 		for (int index = 0; index < size; index++)
 		{
 			fromTable = (FromTable) elementAt(index);
-			fromTable.setAllColumnsProjected(true);
 
 			/* We let the FromTable decide if there is a match on
 			 * the exposed name.  (A JoinNode will not have an

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromTable.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromTable.java?rev=430173&r1=430172&r2=430173&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromTable.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromTable.java Wed Aug
 9 15:48:08 2006
@@ -65,7 +65,7 @@
  *
  * @author Jeff Lichtman
  */
-public abstract class FromTable extends ResultSetNode implements Optimizable
+abstract class FromTable extends ResultSetNode implements Optimizable
 {
 	Properties		tableProperties;
 	String		correlationName;
@@ -110,19 +110,6 @@
 	 we have to keep track of them all.
 	*/
 	private HashMap optimizerToBestPlanMap;
-
-  //this flag tells you if all the columns from this table are projected using * from it.
-  //Used by replication enabled databases where the target-only view failure is detected
-  //using this boolean
-  private boolean allColumnsProjected;
-
-  public boolean areAllColumnsProjected() {
-    return allColumnsProjected;
-  }
-
-  public void setAllColumnsProjected(boolean flag) {
-    allColumnsProjected = flag;
-  }
 
 	/**
 	 * Initializer for a table in a FROM list.

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SetOperatorNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SetOperatorNode.java?rev=430173&r1=430172&r2=430173&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
Wed Aug  9 15:48:08 2006
@@ -52,7 +52,7 @@
  * @author Jeff Lichtman
  */
 
-public abstract class SetOperatorNode extends TableOperatorNode
+abstract class SetOperatorNode extends TableOperatorNode
 {
 	/**
 	** Tells whether to eliminate duplicate rows.  all == TRUE means do
@@ -63,17 +63,17 @@
 	OrderByList orderByList;
 
 	// List of scoped predicates for pushing during optimization.
-	PredicateList leftOptPredicates;
-	PredicateList rightOptPredicates;
+	private PredicateList leftOptPredicates;
+	private PredicateList rightOptPredicates;
 
 	// List of original (unscoped) predicates that we tried to push
 	// during the most recent phase of optimization.
-	PredicateList pushedPredicates;
+	private PredicateList pushedPredicates;
 
 	// Mapping of original predicates to scoped predicates, used to
 	// avoid re-scoping predicates unnecessarily.
-	HashMap leftScopedPreds;
-	HashMap rightScopedPreds;
+	private HashMap leftScopedPreds;
+	private HashMap rightScopedPreds;
 
 	/**
 	 * Initializer for a SetOperatorNode.
@@ -1014,7 +1014,7 @@
 	 * targeted for the left child.  Create a new (empty)
 	 * list if the list is null.
 	 */
-	protected PredicateList getLeftOptPredicateList()
+	PredicateList getLeftOptPredicateList()
 		throws StandardException
 	{
 		if (leftOptPredicates == null) {
@@ -1032,7 +1032,7 @@
 	 * targeted for the right child.  Create a new (empty)
 	 * list if the list is null.
 	 */
-	protected PredicateList getRightOptPredicateList()
+	PredicateList getRightOptPredicateList()
 		throws StandardException
 	{
 		if (rightOptPredicates == null) {

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TableOperatorNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TableOperatorNode.java?rev=430173&r1=430172&r2=430173&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TableOperatorNode.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TableOperatorNode.java
Wed Aug  9 15:48:08 2006
@@ -58,9 +58,8 @@
  * @author Jeff Lichtman
  */
 
-public abstract class TableOperatorNode extends FromTable
+abstract class TableOperatorNode extends FromTable
 {
-	boolean			nestedInParens;
 	ResultSetNode	leftResultSet;
 	ResultSetNode	rightResultSet;
 	Optimizer		leftOptimizer;
@@ -209,7 +208,7 @@
 	{
 		if (SanityManager.DEBUG)
 		{
-			return "nestedInParens: " + nestedInParens + "\n" +
+			return "nestedInParens: " + false + "\n" +
 				leftResultSet.toString() + "\n" +
 				rightResultSet.toString() + "\n" + 
 				super.toString();
@@ -324,24 +323,15 @@
 	/**
 	 * Mark whether or not this node is nested in parens.  (Useful to parser
 	 * since some trees get created left deep and others right deep.)
+	 * The resulting state of this cal was never used so its
+	 * field was removed to save runtimespace for this node.
+	 * Further cleanup can be done including parser changes
+	 * if this call is really nor required.
 	 *
 	 * @param nestedInParens	Whether or not this node is nested in parens.
 	 */
 	public void setNestedInParens(boolean nestedInParens)
 	{
-		this.nestedInParens = nestedInParens;
-	}
-
-	/**
-	 * Return whether or not the table operator for this node was
-	 * nested in parens in the query.  (Useful to parser
-	 * since some trees get created left deep and others right deep.)
-	 *
-	 * @return boolean		Whether or not this node was nested in parens.
-	 */
-	public boolean getNestedInParens()
-	{
-		return nestedInParens;
 	}
 
 



Mime
View raw message