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

    https://github.com/apache/tajo/pull/454#discussion_r28209778
  
    --- Diff: 
tajo-algebra/src/main/java/org/apache/tajo/algebra/WindowSpec.java ---
    @@ -128,12 +128,14 @@ public boolean equals(Object obj) {
       public static enum WindowFrameStartBoundType {
         UNBOUNDED_PRECEDING,
         CURRENT_ROW,
    -    PRECEDING
    +    PRECEDING,
    +    FOLLOWING
       }
    --- End diff --
    
    Hmm... I think the discussion that you linked is not complete one
    because UNBOUNDED_PRECEDING is only available at start bound type while 
UNBOUNDED_FOLLOWING is only available as an end bound type.
    I tested in psql as following
    ```
    mydb=# select id, max(value) over (partition by id rows between unbounded 
following and unbounded following) from test3;
    ERROR:  frame start cannot be UNBOUNDED FOLLOWING
    LINE 1: ...id, max(value) over (partition by id rows between unbounded ...
                                                                 ^
    ```
    and saw the error as I expected.
    
    So, I think it needs separation between start bound type and end bound type.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to