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-3474) Partial aggregate interface design and sort-based implementation
Date Tue, 01 Mar 2016 13:21:18 GMT

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

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

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

    https://github.com/apache/flink/pull/1746#discussion_r54564836
  
    --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/api/table/runtime/aggregate/MinAggregate.scala
---
    @@ -17,70 +17,96 @@
      */
     package org.apache.flink.api.table.runtime.aggregate
     
    -import scala.reflect.runtime.universe._
    +import org.apache.calcite.sql.`type`.SqlTypeName
    +import org.apache.flink.api.table.Row
     
    -abstract class MinAggregate[T: Numeric] extends Aggregate[T] {
    +abstract  class MinAggregate[T: Numeric] extends Aggregate[T]{
     
    -  var result: T = _
    -  val numericResult = implicitly[Numeric[T]]
    +  private val numeric = implicitly[Numeric[T]]
     
    -  override def aggregate(value: Any): Unit = {
    -    val input: T = value.asInstanceOf[T]
    +  /**
    +   * Initiate the partial aggregate value in Row.
    +   * @param partial
    +   */
    +  override def initiate(partial: Row): Unit = {
    +    partial.setField(aggOffsetInRow, numeric.zero)
    --- End diff --
    
    should initialize to the maximum value of the data type instead of `numeric.zero`.


> Partial aggregate interface design and sort-based implementation
> ----------------------------------------------------------------
>
>                 Key: FLINK-3474
>                 URL: https://issues.apache.org/jira/browse/FLINK-3474
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Table API
>            Reporter: Chengxiang Li
>            Assignee: Chengxiang Li
>
> The scope of this sub task includes:
> # Partial aggregate interface.
> # Simple aggregate function implementation, such as SUM/AVG/COUNT/MIN/MAX.
> # DataSetAggregateRule which translate logical calcite aggregate node to Flink user functions.
As hash-based combiner is not available yet(see PR #1517), we would use sort-based combine
as default.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message