flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaoxuan-wang <...@git.apache.org>
Subject [GitHub] flink pull request #3809: [FLINK-5906] [table] Add support to register UDAGG...
Date Wed, 03 May 2017 15:14:38 GMT
Github user shaoxuan-wang commented on a diff in the pull request:

    --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/ProjectionTranslator.scala
    @@ -327,4 +332,56 @@ object ProjectionTranslator {
    +  /**
    +    * Find and replace UDAGG function Call to UDAGGFunctionCall
    +    *
    +    * @param field    the expression to check
    +    * @param tableEnv the TableEnvironment
    +    * @return an expression with correct UDAGGFunctionCall type for UDAGG functions
    +    */
    +  def replaceUDAGGFunctionCall(field: Expression, tableEnv: TableEnvironment): Expression
= {
    --- End diff --
    We will not have the chance to execute LogicalNode#resolveExpressions before get aggNames,
projectFields, etc. I actually tried another alternative approach to conduct the replacement
in extractAggregationsAndProperties and replaceAggregationsAndProperties (we have to check
and handle the UDAGG call carefully in both functions), it works but I do not like that design.
It makes the logic of these two methods not completely clean. Also, in over aggregate it will
not call extractAggregationsAndProperties and replaceAggregationsAndProperties. So I decide
to implement a separate function to handle the UDAGGFunctionCall replacement.

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.

View raw message