flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-7208) Refactor build-in agg(MaxWithRetractAccumulator and MinWithRetractAccumulator) using the DataView
Date Fri, 07 Dec 2018 00:33:00 GMT

    [ https://issues.apache.org/jira/browse/FLINK-7208?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16712177#comment-16712177
] 

ASF GitHub Bot commented on FLINK-7208:
---------------------------------------

sunjincheng121 commented on a change in pull request #7201: [FLINK-7208] [table] Optimize
Min/MaxWithRetractAggFunction with DataView
URL: https://github.com/apache/flink/pull/7201#discussion_r239663677
 
 

 ##########
 File path: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/runtime/aggregate/AggregateUtil.scala
 ##########
 @@ -1437,36 +1437,30 @@ object AggregateUtil {
 
           case collect: SqlAggFunction if collect.getKind == SqlKind.COLLECT =>
             aggregates(index) = new CollectAggFunction(FlinkTypeFactory.toTypeInfo(relDataType))
-            accTypes(index) = aggregates(index).getAccumulatorType
 
           case udagg: AggSqlFunction =>
             aggregates(index) = udagg.getFunction
-            accTypes(index) = udagg.accType
 
           case unSupported: SqlAggFunction =>
             throw new TableException(s"Unsupported Function: '${unSupported.getName}'")
         }
       }
+      accTypes(index) = getAccumulatorTypeOfAggregateFunction(aggregates(index))
     }
 
     val accSpecs = new Array[Seq[DataViewSpec[_]]](aggregateCalls.size)
 
     // create accumulator type information for every aggregate function
     aggregates.zipWithIndex.foreach { case (agg, index) =>
 
 Review comment:
   +1 

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


> Refactor build-in agg(MaxWithRetractAccumulator and MinWithRetractAccumulator) using
the DataView
> -------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-7208
>                 URL: https://issues.apache.org/jira/browse/FLINK-7208
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Table API &amp; SQL
>            Reporter: kaibo.zhou
>            Assignee: Dian Fu
>            Priority: Major
>              Labels: pull-request-available
>
> Refactor build-in agg(MaxWithRetractAccumulator and MinWithRetractAccumulator) using
the DataView.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message