Github user zuyu commented on a diff in the pull request: https://github.com/apache/incubator-quickstep/pull/39#discussion_r68332407 --- Diff: query_optimizer/resolver/Resolver.cpp --- @@ -2362,17 +2568,19 @@ E::ScalarPtr Resolver::resolveSimpleCaseExpression( // TODO(chasseur): For now this only handles resolving aggregate functions. In // the future it should be extended to resolve scalar functions as well. +// TODO(Shixuan): This will handle resolving window aggregation function as well, +// which could be extended to general scalar functions. E::ScalarPtr Resolver::resolveFunctionCall( const ParseFunctionCall &parse_function_call, ExpressionResolutionInfo *expression_resolution_info) { - std::string function_name = ToLower(parse_function_call.name()->value()); - - // TODO(Shixuan): Add support for window aggregation function. + // Check if it is a window function. if (parse_function_call.isWindow()) { - THROW_SQL_ERROR_AT(&parse_function_call) - << "Window Aggregation Function is not supported currently"; + return resolveWindowAggregateFunction(parse_function_call, + expression_resolution_info); } + std::string function_name = ToLower(parse_function_call.name()->value()); --- End diff -- I know we moved this line, but we actually could mark `const` for `function_name`.
--- 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. ---