flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fhueske <...@git.apache.org>
Subject [GitHub] flink pull request #4105: [FLINK-6888] [table] Can not determine TypeInforma...
Date Mon, 19 Jun 2017 13:52:30 GMT
Github user fhueske commented on a diff in the pull request:

    --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/java/BatchTableEnvironment.scala
    @@ -192,10 +193,14 @@ class BatchTableEnvironment(
           name: String,
           f: AggregateFunction[T, ACC])
       : Unit = {
    -    implicit val typeInfo: TypeInformation[T] = TypeExtractor
    -      .createTypeInfo(f, classOf[AggregateFunction[T, ACC]], f.getClass, 0)
    +    implicit val typeInfo: TypeInformation[T] = UserDefinedFunctionUtils
    +      .getResultTypeOfAggregateFunction(f)
    +    implicit val accTypeInfo: TypeInformation[ACC] = UserDefinedFunctionUtils
    --- End diff --
    UDAGGs are sometimes also shared in libraries. If a UDAGG class is included in a JAR file
and loaded into the classpath, a user can hardly tell whether it is implemented in Java or
Scala. So, I would not prohibit Scala UDFs in Jave environments. However, functions which
are intended to be shared should be implemented with Java types.

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.

View raw message