@Internal public class UserFunctionsTypeHelper extends Object
FunctionCatalog
.Modifier and Type | Method and Description |
---|---|
static <T,ACC> TypeInformation<ACC> |
getAccumulatorTypeOfAggregateFunction(UserDefinedAggregateFunction<T,ACC> aggregateFunction)
Tries to infer the TypeInformation of an AggregateFunction's accumulator type.
|
static <T,ACC> TypeInformation<ACC> |
getAccumulatorTypeOfAggregateFunction(UserDefinedAggregateFunction<T,ACC> aggregateFunction,
TypeInformation<ACC> scalaType)
Tries to infer the TypeInformation of an AggregateFunction's accumulator type.
|
static <T,ACC> TypeInformation<T> |
getReturnTypeOfAggregateFunction(UserDefinedAggregateFunction<T,ACC> aggregateFunction)
Tries to infer the TypeInformation of an AggregateFunction's accumulator type.
|
static <T,ACC> TypeInformation<T> |
getReturnTypeOfAggregateFunction(UserDefinedAggregateFunction<T,ACC> aggregateFunction,
TypeInformation<T> scalaType)
Tries to infer the TypeInformation of an AggregateFunction's accumulator type.
|
static <T> TypeInformation<T> |
getReturnTypeOfTableFunction(TableFunction<T> tableFunction)
Tries to infer the TypeInformation of an AggregateFunction's accumulator type.
|
static <T> TypeInformation<T> |
getReturnTypeOfTableFunction(TableFunction<T> tableFunction,
TypeInformation<T> scalaType)
Tries to infer the TypeInformation of an AggregateFunction's accumulator type.
|
static void |
validateInstantiation(Class<?> clazz)
Checks if a user-defined function can be easily instantiated.
|
static void |
validateNotSingleton(Class<?> clazz)
Check whether this is a Scala object.
|
public static <T,ACC> TypeInformation<T> getReturnTypeOfAggregateFunction(UserDefinedAggregateFunction<T,ACC> aggregateFunction)
aggregateFunction
- The AggregateFunction for which the accumulator type is inferred.public static <T,ACC> TypeInformation<T> getReturnTypeOfAggregateFunction(UserDefinedAggregateFunction<T,ACC> aggregateFunction, TypeInformation<T> scalaType)
aggregateFunction
- The AggregateFunction for which the accumulator type is inferred.scalaType
- The implicitly inferred type of the accumulator type.public static <T,ACC> TypeInformation<ACC> getAccumulatorTypeOfAggregateFunction(UserDefinedAggregateFunction<T,ACC> aggregateFunction)
aggregateFunction
- The AggregateFunction for which the accumulator type is inferred.public static <T,ACC> TypeInformation<ACC> getAccumulatorTypeOfAggregateFunction(UserDefinedAggregateFunction<T,ACC> aggregateFunction, TypeInformation<ACC> scalaType)
aggregateFunction
- The AggregateFunction for which the accumulator type is inferred.scalaType
- The implicitly inferred type of the accumulator type.public static <T> TypeInformation<T> getReturnTypeOfTableFunction(TableFunction<T> tableFunction)
tableFunction
- The TableFunction for which the accumulator type is inferred.public static <T> TypeInformation<T> getReturnTypeOfTableFunction(TableFunction<T> tableFunction, TypeInformation<T> scalaType)
tableFunction
- The TableFunction for which the accumulator type is inferred.scalaType
- The implicitly inferred type of the accumulator type.public static void validateInstantiation(Class<?> clazz)
public static void validateNotSingleton(Class<?> clazz)
TableFunction
implemented
by a Scala object, since concurrent risks.Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.