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

    https://github.com/apache/incubator-quickstep/pull/39#discussion_r68330834
  
    --- Diff: query_optimizer/resolver/Resolver.cpp ---
    @@ -992,6 +1059,29 @@ L::LogicalPtr Resolver::resolveSelect(
       SelectListInfo select_list_info(select_list_expressions,
                                       has_aggregate_per_expression);
     
    +  // Create window aggregate node if needed
    +  for (E::AliasPtr alias : 
window_aggregation_info.window_aggregate_expressions) {
    +    E::WindowAggregateFunctionPtr window_aggregate_function;
    +    if 
(!E::SomeWindowAggregateFunction::MatchesWithConditionalCast(alias->expression(),
    +                                                                    
&window_aggregate_function)) {
    +      THROW_SQL_ERROR()
    +          << "Unexpected expression in window aggregation function";
    +    }
    +    L::LogicalPtr sorted_logical_plan;
    +
    +    // Get the sorted logical plan
    +    const std::string window_name = 
window_aggregate_function->window_name();
    +    if (window_name != "") {
    --- End diff --
    
    Suggest to use `!window_name.empty()`.


---
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