quickstep-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shixuan-fan <...@git.apache.org>
Subject [GitHub] incubator-quickstep pull request #58: QUICKSTEP-20: Supported Window Aggrega...
Date Tue, 19 Jul 2016 19:11:36 GMT
Github user shixuan-fan commented on a diff in the pull request:

    https://github.com/apache/incubator-quickstep/pull/58#discussion_r71403917
  
    --- Diff: query_optimizer/tests/execution_generator/Select.test ---
    @@ -953,19 +953,79 @@ WHERE double_col < 0
     ==
     
     # Window Aggregation Test.
    -# Currently this is not supported, an empty table will be returned.
    -SELECT avg(int_col) OVER w FROM test
    +SELECT char_col, long_col, avg(long_col) OVER w FROM test
     WINDOW w AS
    -(PARTITION BY char_col
    - ORDER BY long_col DESC NULLS LAST
    +(ORDER BY char_col DESC NULLS LAST
    --- End diff --
    
    When the `RANGE` mode is introduced, a new parameter will be added to the `WindowAggregationHandle::calculate()`
method, and would most likely be `const std::vector<attribute_id> &order_by_ids`.
As for the cases where `ORDER BY` clause is missing, the vector would simply be empty, which
indicates that the table is sorted by `tuple_id`. 
    
    I don't think we need to explicitly add `tuple_id` as a sort attribute, because it is
not actually an attribute.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message