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

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

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

    https://github.com/apache/tajo/pull/13#discussion_r13899522
  
    --- Diff: 
tajo-algebra/src/main/java/org/apache/tajo/algebra/WindowSpec.java ---
    @@ -79,17 +76,47 @@ public WindowFrame getWindowFrame() {
         return windowFrame;
       }
     
    +  public Object clone() throws CloneNotSupportedException {
    +    WindowSpec windowSpec = (WindowSpec) super.clone();
    +    windowSpec.windowName = windowName;
    +    if (hasPartitionBy()) {
    +      windowSpec.partitionKeys = new Expr[windowSpec.partitionKeys.length];
    +      for (int i = 0; i < partitionKeys.length; i++) {
    +        windowSpec.partitionKeys[i] = (Expr) partitionKeys[i].clone();
    +      }
    +    }
    +    if (hasOrderBy()) {
    +      windowSpec.sortSpecs = new Sort.SortSpec[sortSpecs.length];
    +      for (int i = 0; i < sortSpecs.length; i++) {
    +        windowSpec.sortSpecs[i] = (Sort.SortSpec) sortSpecs[i].clone();
    +      }
    +    }
    +    if (hasWindowFrame()) {
    +      windowSpec.windowFrame = (WindowFrame) windowFrame.clone();
    +    }
    +    return windowSpec;
    +  }
    +
       @Override
       public int hashCode() {
         return Objects.hashCode(windowName, partitionKeys, sortSpecs);
    --- End diff --
    
    When windowFrame is not null, it also should be considered.


> Implement logical plan part and physical executor for window function.
> ----------------------------------------------------------------------
>
>                 Key: TAJO-774
>                 URL: https://issues.apache.org/jira/browse/TAJO-774
>             Project: Tajo
>          Issue Type: Sub-task
>          Components: planner/optimizer
>            Reporter: Hyunsik Choi
>            Assignee: Hyunsik Choi
>             Fix For: 0.9.0
>
>
> See the title. The main objective of this issue is to implement the logical 
> planning part for window function support.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to