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

    https://github.com/apache/incubator-quickstep/pull/39#discussion_r68326145
  
    --- Diff: query_optimizer/expressions/WindowAggregateFunction.hpp ---
    @@ -0,0 +1,246 @@
    +/**
    + *   Copyright 2011-2015 Quickstep Technologies LLC.
    + *   Copyright 2015 Pivotal Software, Inc.
    + *   Copyright 2016, Quickstep Research Group, Computer Sciences 
Department,
    + *     University of Wisconsin—Madison.
    + *
    + *   Licensed under the Apache License, Version 2.0 (the "License");
    + *   you may not use this file except in compliance with the License.
    + *   You may obtain a copy of the License at
    + *
    + *       http://www.apache.org/licenses/LICENSE-2.0
    + *
    + *   Unless required by applicable law or agreed to in writing, software
    + *   distributed under the License is distributed on an "AS IS" BASIS,
    + *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied.
    + *   See the License for the specific language governing permissions and
    + *   limitations under the License.
    + **/
    +
    +#ifndef 
QUICKSTEP_QUERY_OPTIMIZER_EXPRESSIONS_WINDOW_AGGREGATE_FUNCTION_HPP_
    +#define 
QUICKSTEP_QUERY_OPTIMIZER_EXPRESSIONS_WINDOW_AGGREGATE_FUNCTION_HPP_
    +
    +#include <memory>
    +#include <string>
    +#include <vector>
    +
    +#include "query_optimizer/OptimizerTree.hpp"
    +#include "query_optimizer/expressions/AttributeReference.hpp"
    +#include "query_optimizer/expressions/Expression.hpp"
    +#include "query_optimizer/expressions/ExpressionType.hpp"
    +#include "query_optimizer/expressions/Scalar.hpp"
    +#include "utility/Macros.hpp"
    +
    +namespace quickstep {
    +
    +class AggregateFunction;
    +class Type;
    +
    +namespace optimizer {
    +namespace expressions {
    +
    +/** \addtogroup OptimizerExpressions
    + *  @{
    + */
    +
    +struct WindowFrameInfo {
    +  /**
    +   * @brief Cosntructor.
    +   *
    +   * @param is_row_in True if this window frame is defined by ROWS, false 
if
    +   *                  defined by RANGE.
    +   * @param num_preceding_in The number of preceding tuples the window 
frame
    +   *                         will cover, -1 means UNBOUNDED.
    +   * @param num_following_in The number of following tuples the window 
frame
    +   *                         will cover, -1 means UNBOUNDED.
    +   **/
    +  explicit WindowFrameInfo(const bool is_row_in,
    +                           const int num_preceding_in,
    +                           const int num_following_in)
    +      : is_row(is_row_in),
    +        num_preceding(num_preceding_in),
    +        num_following(num_following_in) {}
    +
    +  const bool is_row;
    +  const int num_preceding;
    +  const int num_following;
    +};
    +
    +struct WindowInfo {
    +  /**
    +   * @brief Constructor.
    +   *
    +   * @param partition_by_attributes_in The partition keys for the window.
    +   * @param order_by_attributes_in The order keys for the window.
    +   * @param order_by_directions_in The order direction for order key.
    +   * @param nulls_first_in The nulls' position for order key.
    +   * @param frame_info_in The window frame information for the window. Null
    +   *        means there is no explicit window frame definition.
    +   **/
    +  explicit WindowInfo(const std::vector<AttributeReferencePtr> 
&partition_by_attributes_in,
    --- End diff --
    
    Ditto for `explicit`.


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

Reply via email to