public class FieldInfoUtils extends Object
TypeInformation
s.Modifier and Type | Class and Description |
---|---|
static class |
FieldInfoUtils.TypeInfoSchema
Describes fields' names, indices and
DataType s extracted from a TypeInformation and possibly transformed via Expression application. |
Modifier and Type | Method and Description |
---|---|
static int[] |
getFieldIndices(TypeInformation<?> inputType)
Returns field indexes for a given
TypeInformation . |
static <A> String[] |
getFieldNames(TypeInformation<A> inputType)
Returns field names for a given
TypeInformation . |
static <A> String[] |
getFieldNames(TypeInformation<A> inputType,
List<String> existingNames)
Returns field names for a given
TypeInformation . |
static <A> FieldInfoUtils.TypeInfoSchema |
getFieldsInfo(TypeInformation<A> inputType)
Returns a
FieldInfoUtils.TypeInfoSchema for a given TypeInformation . |
static <A> FieldInfoUtils.TypeInfoSchema |
getFieldsInfo(TypeInformation<A> inputType,
Expression[] expressions)
Returns a
FieldInfoUtils.TypeInfoSchema for a given TypeInformation . |
static TypeInformation<?>[] |
getFieldTypes(TypeInformation<?> inputType)
Returns field types for a given
TypeInformation . |
static <A> void |
validateInputTypeInfo(TypeInformation<A> typeInfo)
Validate if class represented by the typeInfo is static and globally accessible.
|
public static <A> FieldInfoUtils.TypeInfoSchema getFieldsInfo(TypeInformation<A> inputType)
FieldInfoUtils.TypeInfoSchema
for a given TypeInformation
.A
- The type of the TypeInformation.inputType
- The TypeInformation to extract the mapping from.TableSchema
.FieldInfoUtils.TypeInfoSchema
public static <A> FieldInfoUtils.TypeInfoSchema getFieldsInfo(TypeInformation<A> inputType, Expression[] expressions)
FieldInfoUtils.TypeInfoSchema
for a given TypeInformation
. It gives control of the
process of mapping TypeInformation
to TableSchema
(via FieldInfoUtils.TypeInfoSchema
).
Possible operations via the expressions include:
TimestampType
.
A
- The type of the TypeInformation.inputType
- The TypeInformation to extract the mapping from.expressions
- Expressions to apply while extracting the mapping.TableSchema
.FieldInfoUtils.TypeInfoSchema
public static <A> String[] getFieldNames(TypeInformation<A> inputType)
TypeInformation
.A
- The type of the TypeInformation.inputType
- The TypeInformation extract the field names.public static <A> String[] getFieldNames(TypeInformation<A> inputType, List<String> existingNames)
TypeInformation
. If the input TypeInformation
is not a composite type, the result field name should not exist in the existingNames.A
- The type of the TypeInformation.inputType
- The TypeInformation extract the field names.existingNames
- The existing field names for non-composite types that can not be used.public static <A> void validateInputTypeInfo(TypeInformation<A> typeInfo)
typeInfo
- type to checkValidationException
- if type does not meet these criteriapublic static int[] getFieldIndices(TypeInformation<?> inputType)
TypeInformation
.inputType
- The TypeInformation extract the field positions from.public static TypeInformation<?>[] getFieldTypes(TypeInformation<?> inputType)
TypeInformation
.inputType
- The TypeInformation to extract field types from.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.