T
- The type of the tuple.@Public public final class TupleTypeInfo<T extends Tuple> extends TupleTypeInfoBase<T>
TypeInformation
for the tuple types of the Java API.CompositeType.FlatFieldDescriptor, CompositeType.InvalidFieldReferenceException, CompositeType.TypeComparatorBuilder<T>
Modifier and Type | Field and Description |
---|---|
protected String[] |
fieldNames |
types
Constructor and Description |
---|
TupleTypeInfo(Class<T> tupleType,
TypeInformation<?>... types) |
TupleTypeInfo(TypeInformation<?>... types) |
Modifier and Type | Method and Description |
---|---|
boolean |
canEqual(Object obj)
Returns true if the given object can be equaled with this object.
|
TypeSerializer<T> |
createSerializer(ExecutionConfig config)
Deprecated.
|
TupleSerializer<T> |
createSerializer(SerializerConfig serializerConfig)
Creates a serializer for the type.
|
protected CompositeType.TypeComparatorBuilder<T> |
createTypeComparatorBuilder() |
boolean |
equals(Object obj) |
static <X extends Tuple> |
getBasicAndBasicValueTupleTypeInfo(Class<?>... basicTypes) |
static <X extends Tuple> |
getBasicTupleTypeInfo(Class<?>... basicTypes) |
int |
getFieldIndex(String fieldName)
Returns the field index of the composite field of the given name.
|
String[] |
getFieldNames()
Returns the names of the composite fields of this type.
|
Map<String,TypeInformation<?>> |
getGenericParameters()
Optional method for giving Flink's type extraction system information about the mapping of a
generic type parameter to the type information of a subtype.
|
int |
hashCode() |
String |
toString() |
getArity, getFieldTypes, getFlatFields, getTotalFields, getTypeAt, getTypeAt, hasDeterministicFieldOrder, isBasicType, isCaseClass, isTupleType
createComparator, getFlatFields, getTypeClass, hasField, isKeyType, isSortKeyType
of, of
protected final String[] fieldNames
@PublicEvolving public TupleTypeInfo(TypeInformation<?>... types)
@PublicEvolving public TupleTypeInfo(Class<T> tupleType, TypeInformation<?>... types)
@PublicEvolving public String[] getFieldNames()
CompositeType
getFieldNames
in class CompositeType<T extends Tuple>
@PublicEvolving public int getFieldIndex(String fieldName)
CompositeType
getFieldIndex
in class CompositeType<T extends Tuple>
@PublicEvolving public TupleSerializer<T> createSerializer(SerializerConfig serializerConfig)
TypeInformation
createSerializer
in class TypeInformation<T extends Tuple>
serializerConfig
- The config used to parameterize the serializer.@Deprecated @PublicEvolving public TypeSerializer<T> createSerializer(ExecutionConfig config)
TypeInformation
TypeSerializer
for this type.createSerializer
in class TypeInformation<T extends Tuple>
config
- the configuration of this job executionprotected CompositeType.TypeComparatorBuilder<T> createTypeComparatorBuilder()
createTypeComparatorBuilder
in class CompositeType<T extends Tuple>
public Map<String,TypeInformation<?>> getGenericParameters()
TypeInformation
For instance, a method for a Tuple2
would look like this:
Map m = new HashMap();
m.put("T0", this.getTypeAt(0));
m.put("T1", this.getTypeAt(1));
return m;
getGenericParameters
in class TypeInformation<T extends Tuple>
public boolean equals(Object obj)
equals
in class TupleTypeInfoBase<T extends Tuple>
public boolean canEqual(Object obj)
TypeInformation
canEqual
in class TupleTypeInfoBase<T extends Tuple>
obj
- Object which wants to take part in the equality relationpublic int hashCode()
hashCode
in class TupleTypeInfoBase<T extends Tuple>
public String toString()
toString
in class TupleTypeInfoBase<T extends Tuple>
@PublicEvolving public static <X extends Tuple> TupleTypeInfo<X> getBasicTupleTypeInfo(Class<?>... basicTypes)
@PublicEvolving public static <X extends Tuple> TupleTypeInfo<X> getBasicAndBasicValueTupleTypeInfo(Class<?>... basicTypes)
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.