FAQ
Author: jcamacho
Date: Wed Apr 1 16:15:19 2015
New Revision: 1670709

URL: http://svn.apache.org/r1670709
Log:
HIVE-10182 : CBO (Calcite Return Path): Improve CBO cost related debugging messages for Join operators [CBO branch] (Jesus Camacho Rodriguez, reviewed by Ashutosh Chauhan)

Modified:
     hive/branches/cbo/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/reloperators/HiveJoin.java

Modified: hive/branches/cbo/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/reloperators/HiveJoin.java
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/reloperators/HiveJoin.java?rev=1670709&r1=1670708&r2=1670709&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/reloperators/HiveJoin.java (original)
+++ hive/branches/cbo/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/reloperators/HiveJoin.java Wed Apr 1 16:15:19 2015
@@ -155,13 +155,15 @@ public class HiveJoin extends Join imple
      Set<JoinAlgorithm> possibleAlgorithms = obtainJoinAlgorithms();
      // 4. For each possible algorithm, calculate cost, and select best
      RelOptCost selfCost = null;
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Join algorithm selection for: " + this);
+ }
      for (JoinAlgorithm possibleAlgorithm : possibleAlgorithms) {
        switch (possibleAlgorithm) {
          case COMMON_JOIN:
            RelOptCost commonJoinCost = computeSelfCostCommonJoin();
            if (LOG.isDebugEnabled()) {
- LOG.debug("COMMONJOIN possible");
- LOG.debug("COMMONJOIN cost: " + commonJoinCost);
+ LOG.debug(JoinAlgorithm.COMMON_JOIN + " cost: " + commonJoinCost);
            }
            if (selfCost == null || commonJoinCost.isLt(selfCost) ) {
              this.joinAlgorithm = JoinAlgorithm.COMMON_JOIN;
@@ -171,8 +173,7 @@ public class HiveJoin extends Join imple
          case MAP_JOIN:
            RelOptCost mapJoinCost = computeSelfCostMapJoin();
            if (LOG.isDebugEnabled()) {
- LOG.debug("MAPJOIN possible");
- LOG.debug("MAPJOIN cost: " + mapJoinCost);
+ LOG.debug(JoinAlgorithm.MAP_JOIN + " cost: " + mapJoinCost);
            }
            if (selfCost == null || mapJoinCost.isLt(selfCost) ) {
              this.joinAlgorithm = JoinAlgorithm.MAP_JOIN;
@@ -182,8 +183,7 @@ public class HiveJoin extends Join imple
          case BUCKET_JOIN:
            RelOptCost bucketJoinCost = computeSelfCostBucketJoin();
            if (LOG.isDebugEnabled()) {
- LOG.debug("BUCKETJOIN possible");
- LOG.debug("BUCKETJOIN cost: " + bucketJoinCost);
+ LOG.debug(JoinAlgorithm.BUCKET_JOIN + " cost: " + bucketJoinCost);
            }
            if (selfCost == null || bucketJoinCost.isLt(selfCost) ) {
              this.joinAlgorithm = JoinAlgorithm.BUCKET_JOIN;
@@ -193,8 +193,7 @@ public class HiveJoin extends Join imple
          case SMB_JOIN:
            RelOptCost smbJoinCost = computeSelfCostSMBJoin();
            if (LOG.isDebugEnabled()) {
- LOG.debug("SMBJOIN possible");
- LOG.debug("SMBJOIN cost: " + smbJoinCost);
+ LOG.debug(JoinAlgorithm.SMB_JOIN + " cost: " + smbJoinCost);
            }
            if (selfCost == null || smbJoinCost.isLt(selfCost) ) {
              this.joinAlgorithm = JoinAlgorithm.SMB_JOIN;
@@ -205,6 +204,9 @@ public class HiveJoin extends Join imple
            //TODO: Exception
        }
      }
+ if (LOG.isDebugEnabled()) {
+ LOG.debug(this.joinAlgorithm + " selected");
+ }
      return selfCost;
    }

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 1 | next ›
Discussion Overview
groupcommits @
categorieshive, hadoop
postedApr 1, '15 at 4:15p
activeApr 1, '15 at 4:15p
posts1
users1
websitehive.apache.org

1 user in discussion

Jcamacho: 1 post

People

Translate

site design / logo © 2021 Grokbase