[ 
https://issues.apache.org/jira/browse/TAJO-1882?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14986471#comment-14986471
 ] 

ASF GitHub Bot commented on TAJO-1882:
--------------------------------------

Github user dkhwangbo commented on a diff in the pull request:

    https://github.com/apache/tajo/pull/817#discussion_r43708266
  
    --- Diff: 
tajo-plan/src/main/java/org/apache/tajo/plan/joinorder/GreedyHeuristicJoinOrderAlgorithm.java
 ---
    @@ -393,18 +393,18 @@ public static double getCost(JoinEdge joinEdge) {
               break;
           }
           // cost = estimated input size * filter factor * (output tuple width 
/ input tuple width)
    -      cost = getCost(joinEdge.getLeftVertex()) *
    -          getCost(joinEdge.getRightVertex()) * factor;
    +      cost = getCostWithVertex(joinEdge.getLeftVertex()) *
    +          getCostWithVertex(joinEdge.getRightVertex()) * factor;
         } else {
           // make cost bigger if cross join
    -      cost = Math.pow(getCost(joinEdge.getLeftVertex()) *
    -          getCost(joinEdge.getRightVertex()), 2);
    +      cost = Math.pow(getCostWithVertex(joinEdge.getLeftVertex()) *
    +          getCostWithVertex(joinEdge.getRightVertex()), 2);
         }
     
         return checkInfinity(cost * COMPUTATION_FACTOR);
       }
     
    -  public static double getCost(JoinVertex joinVertex) {
    +  public static double getCostWithVertex(JoinVertex joinVertex) {
    --- End diff --
    
    OK. I apply your comment.


> Clean up GreedyHeuristicJoinOrderAlgorithm::getCost APIs
> --------------------------------------------------------
>
>                 Key: TAJO-1882
>                 URL: https://issues.apache.org/jira/browse/TAJO-1882
>             Project: Tajo
>          Issue Type: Improvement
>            Reporter: Hyunsik Choi
>            Assignee: Dongkyu Hwangbo
>            Priority: Trivial
>              Labels: newbie
>
> See the title. The definition of 
> {{GreedyHeuristicJoinOrderAlgorithm::getCost}} is somewhat ambiguous. In Java 
> 8, it requires explicitly type casting. We can clean up its APIs by renaming 
> them to be different.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to