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

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

Github user shaoxuan-wang commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3593#discussion_r107410682
  
    --- Diff: 
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/functions/aggfunctions/MaxAggFunctionWithRetract.scala
 ---
    @@ -201,14 +201,22 @@ class DoubleMaxWithRetractAggFunction extends 
MaxWithRetractAggFunction[Double]
       * Built-in Boolean Max with retraction aggregate function
       */
     class BooleanMaxWithRetractAggFunction extends 
MaxWithRetractAggFunction[Boolean] {
    -  override def getInitValue = false
    +  override def getInitValue: Boolean = false
       override def getValueTypeInfo = BasicTypeInfo.BOOLEAN_TYPE_INFO
     }
     
     /**
       * Built-in Big Decimal Max with retraction aggregate function
       */
     class DecimalMaxWithRetractAggFunction extends 
MaxWithRetractAggFunction[BigDecimal] {
    -  override def getInitValue = BigDecimal.ZERO
    +  override def getInitValue: BigDecimal = BigDecimal.ZERO
       override def getValueTypeInfo = BasicTypeInfo.BIG_DEC_TYPE_INFO
     }
    +
    +/**
    +  * Built-in String Max with retraction aggregate function
    +  */
    +class StringMaxWithRetractAggFunction extends 
MaxWithRetractAggFunction[String] {
    +  override def getInitValue: String = ""
    --- End diff --
    
    remove ": String"?


> support max/min aggregations for string type
> --------------------------------------------
>
>                 Key: FLINK-6124
>                 URL: https://issues.apache.org/jira/browse/FLINK-6124
>             Project: Flink
>          Issue Type: Improvement
>          Components: Table API & SQL
>            Reporter: Zhenghua Gao
>            Assignee: Zhenghua Gao
>             Fix For: 1.3.0
>
>
> Recently when I port some query to Flink SQL, I found currently min/max 
> aggregations on string type is not supported and should be added.
> When min/max aggregations are used on string column, return min/max value by 
> lexicographically order.
>  



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to