flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From suez1224 <...@git.apache.org>
Subject [GitHub] flink pull request #4585: [FLINK-7491] [Table API & SQL] add MultiSetTypeInf...
Date Wed, 27 Sep 2017 22:37:45 GMT
Github user suez1224 commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4585#discussion_r141485981
  
    --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/runtime/aggregate/AggregateUtil.scala
---
    @@ -1414,8 +1414,29 @@ object AggregateUtil {
               aggregates(index) = udagg.getFunction
               accTypes(index) = udagg.accType
     
    -        case unSupported: SqlAggFunction =>
    -          throw new TableException(s"unsupported Function: '${unSupported.getName}'")
    +        case other: SqlAggFunction =>
    +          if (other.getKind == SqlKind.COLLECT) {
    +            aggregates(index) = sqlTypeName match {
    +              case TINYINT =>
    +                new ByteCollectAggFunction
    +              case SMALLINT =>
    +                new ShortCollectAggFunction
    +              case INTEGER =>
    +                new IntCollectAggFunction
    +              case BIGINT =>
    +                new LongCollectAggFunction
    +              case VARCHAR | CHAR =>
    +                new StringCollectAggFunction
    +              case FLOAT =>
    +                new FloatCollectAggFunction
    +              case DOUBLE =>
    +                new DoubleCollectAggFunction
    +              case _ =>
    +                new ObjectCollectAggFunction
    +            }
    +          } else {
    --- End diff --
    
    done


---

Mime
View raw message