Return-Path: X-Original-To: apmail-db-derby-commits-archive@www.apache.org Delivered-To: apmail-db-derby-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2F629105C7 for ; Thu, 6 Mar 2014 20:36:32 +0000 (UTC) Received: (qmail 39276 invoked by uid 500); 6 Mar 2014 20:36:31 -0000 Delivered-To: apmail-db-derby-commits-archive@db.apache.org Received: (qmail 39231 invoked by uid 500); 6 Mar 2014 20:36:31 -0000 Mailing-List: contact derby-commits-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Derby Development" List-Id: Delivered-To: mailing list derby-commits@db.apache.org Received: (qmail 39221 invoked by uid 99); 6 Mar 2014 20:36:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Mar 2014 20:36:31 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Mar 2014 20:36:30 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id EA27223889EC; Thu, 6 Mar 2014 20:36:09 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1575032 - in /db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile: DMLModStatementNode.java MatchingClauseNode.java MergeNode.java Date: Thu, 06 Mar 2014 20:36:09 -0000 To: derby-commits@db.apache.org From: rhillegas@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140306203609.EA27223889EC@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: rhillegas Date: Thu Mar 6 20:36:09 2014 New Revision: 1575032 URL: http://svn.apache.org/r1575032 Log: DERBY-3155: Implement printSubNodes() for MergeNode and MatchingClauseNode; commit derby-3155-37-aa-printSubNodes.diff. Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DMLModStatementNode.java db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/MatchingClauseNode.java db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/MergeNode.java Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DMLModStatementNode.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DMLModStatementNode.java?rev=1575032&r1=1575031&r2=1575032&view=diff ============================================================================== --- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DMLModStatementNode.java (original) +++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/DMLModStatementNode.java Thu Mar 6 20:36:09 2014 @@ -1947,8 +1947,11 @@ abstract class DMLModStatementNode exten { super.printSubNodes(depth); - printLabel(depth, "targetTableName: "); - targetTableName.treePrint(depth + 1); + if ( targetTableName != null ) + { + printLabel(depth, "targetTableName: "); + targetTableName.treePrint(depth + 1); + } if (resultColumnList != null) { Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/MatchingClauseNode.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/MatchingClauseNode.java?rev=1575032&r1=1575031&r2=1575032&view=diff ============================================================================== --- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/MatchingClauseNode.java (original) +++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/MatchingClauseNode.java Thu Mar 6 20:36:09 2014 @@ -1564,6 +1564,45 @@ public class MatchingClauseNode extends } /** + * Prints the sub-nodes of this object. See QueryTreeNode.java for + * how tree printing is supposed to work. + * + * @param depth The depth of this node in the tree + */ + @Override + void printSubNodes( int depth ) + { + if (SanityManager.DEBUG) + { + super.printSubNodes( depth ); + + if ( _matchingRefinement != null ) + { + printLabel( depth, "matchingRefinement: " ); + _matchingRefinement.treePrint( depth + 1 ); + } + + if ( _updateColumns != null ) + { + printLabel( depth, "updateColumns: " ); + _updateColumns.treePrint( depth + 1 ); + } + + if ( _insertColumns != null ) + { + printLabel( depth, "insertColumns: " ); + _insertColumns.treePrint( depth + 1 ); + } + + if ( _insertValues != null ) + { + printLabel( depth, "insertValues: " ); + _insertValues.treePrint( depth + 1 ); + } + } + } + + /** * Convert this object to a String. See comments in QueryTreeNode.java * for how this should be done for tree printing. * Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/MergeNode.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/MergeNode.java?rev=1575032&r1=1575031&r2=1575032&view=diff ============================================================================== --- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/MergeNode.java (original) +++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/MergeNode.java Thu Mar 6 20:36:09 2014 @@ -972,6 +972,39 @@ public final class MergeNode extends DML } } + /** + * Prints the sub-nodes of this object. See QueryTreeNode.java for + * how tree printing is supposed to work. + * + * @param depth The depth of this node in the tree + */ + @Override + void printSubNodes( int depth ) + { + if (SanityManager.DEBUG) + { + super.printSubNodes( depth ); + + printLabel( depth, "targetTable: " ); + _targetTable.treePrint( depth + 1 ); + + printLabel( depth, "sourceTable: " ); + _sourceTable.treePrint( depth + 1 ); + + if ( _searchCondition != null ) + { + printLabel( depth, "searchCondition: " ); + _searchCondition.treePrint( depth + 1 ); + } + + for ( MatchingClauseNode mcn : _matchingClauses ) + { + printLabel( depth, mcn.toString() ); + mcn.treePrint( depth + 1 ); + } + } + } + @Override String statementToString() {