flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] twalthr commented on a change in pull request #7177: [FLINK-7599] [table] Support for aggregates in MATCH_RECOGNIZE
Date Tue, 04 Dec 2018 16:02:01 GMT
twalthr commented on a change in pull request #7177: [FLINK-7599] [table] Support for aggregates
in MATCH_RECOGNIZE
URL: https://github.com/apache/flink/pull/7177#discussion_r238711587
 
 

 ##########
 File path: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/codegen/MatchCodeGenerator.scala
 ##########
 @@ -504,24 +588,25 @@ class MatchCodeGenerator(
 
     private val rowTypeTerm = "org.apache.flink.types.Row"
 
-    def getOrAddAggregation(call: RexCall): GeneratedExpression = {
-      reusableInputUnboxingExprs.get((call.toString, 0)) match  {
+    def generateAggAccess(aggCall: RexCall): GeneratedExpression = {
+      reusableInputUnboxingExprs.get((aggCall.toString, 0)) match  {
         case Some(expr) =>
           expr
 
         case None =>
-          val exp: GeneratedExpression = generateAggAccess(call)
-          aggregates += call
-          reusableInputUnboxingExprs((call.toString, 0)) = exp
+          val exp: GeneratedExpression = doGenerateAggAccess(aggCall)
 
 Review comment:
   The naming is still not perfect here. What is the difference between `generateAggAccess`
and `doGenerateAggAccess`? How about `generateDeduplicatedAggAccess` and `generateAggAccess`?
 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message