Class Types
- java.lang.Object
-
- org.apache.flink.table.legacy.api.Types
-
@Deprecated @Internal public final class Types extends Object
Deprecated.This class will be removed in future versions as it uses the old type system. It is recommended to useDataTypesinstead which uses the new type system based on instances ofDataType. Please make sure to use either the old or the new type system consistently to avoid unintended behavior. See the website documentation for more information.This class enumerates all supported types of the Table API & SQL.
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static org.apache.flink.api.common.typeinfo.TypeInformation<Boolean>BOOLEAN()Deprecated.Returns type information for a Table API boolean or SQL BOOLEAN type.static org.apache.flink.api.common.typeinfo.TypeInformation<Byte>BYTE()Deprecated.Returns type information for a Table API byte or SQL TINYINT type.static org.apache.flink.api.common.typeinfo.TypeInformation<BigDecimal>DECIMAL()Deprecated.Returns type information for a Table API big decimal or SQL DECIMAL type.static org.apache.flink.api.common.typeinfo.TypeInformation<Double>DOUBLE()Deprecated.Returns type information for a Table API integer or SQL DOUBLE type.static org.apache.flink.api.common.typeinfo.TypeInformation<Float>FLOAT()Deprecated.Returns type information for a Table API float or SQL FLOAT/REAL type.static org.apache.flink.api.common.typeinfo.TypeInformation<Integer>INT()Deprecated.Returns type information for a Table API integer or SQL INT/INTEGER type.static org.apache.flink.api.common.typeinfo.TypeInformation<Long>INTERVAL_MILLIS()Deprecated.Returns type information for a Table API interval of milliseconds.static org.apache.flink.api.common.typeinfo.TypeInformation<Integer>INTERVAL_MONTHS()Deprecated.Returns type information for a Table API interval of months.static org.apache.flink.api.common.typeinfo.TypeInformation<LocalDate>LOCAL_DATE()Deprecated.Returns type information for a Table API LocalDate type.static org.apache.flink.api.common.typeinfo.TypeInformation<LocalDateTime>LOCAL_DATE_TIME()Deprecated.Returns type information for a Table API LocalDateTime type.static org.apache.flink.api.common.typeinfo.TypeInformation<LocalTime>LOCAL_TIME()Deprecated.Returns type information for a Table API LocalTime type.static org.apache.flink.api.common.typeinfo.TypeInformation<Long>LONG()Deprecated.Returns type information for a Table API long or SQL BIGINT type.static <K,V>
org.apache.flink.api.common.typeinfo.TypeInformation<Map<K,V>>MAP(org.apache.flink.api.common.typeinfo.TypeInformation<K> keyType, org.apache.flink.api.common.typeinfo.TypeInformation<V> valueType)Deprecated.Generates type information for a Java HashMap.static <E> org.apache.flink.api.common.typeinfo.TypeInformation<Map<E,Integer>>MULTISET(org.apache.flink.api.common.typeinfo.TypeInformation<E> elementType)Deprecated.Generates type information for a Multiset.static <E> org.apache.flink.api.common.typeinfo.TypeInformation<E[]>OBJECT_ARRAY(org.apache.flink.api.common.typeinfo.TypeInformation<E> elementType)Deprecated.Generates type information for an array consisting of Java object elements.static org.apache.flink.api.common.typeinfo.TypeInformation<?>PRIMITIVE_ARRAY(org.apache.flink.api.common.typeinfo.TypeInformation<?> elementType)Deprecated.Generates type information for an array consisting of Java primitive elements.static org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.types.Row>ROW(String[] fieldNames, org.apache.flink.api.common.typeinfo.TypeInformation<?>[] types)Deprecated.Returns type information forRowwith fields of the given types and with given names.static org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.types.Row>ROW(org.apache.flink.api.common.typeinfo.TypeInformation<?>... types)Deprecated.Returns type information forRowwith fields of the given types.static org.apache.flink.api.common.typeinfo.TypeInformation<Short>SHORT()Deprecated.Returns type information for a Table API short or SQL SMALLINT type.static org.apache.flink.api.common.typeinfo.TypeInformation<Date>SQL_DATE()Deprecated.Returns type information for a Table API SQL date or SQL DATE type.static org.apache.flink.api.common.typeinfo.TypeInformation<Time>SQL_TIME()Deprecated.Returns type information for a Table API SQL time or SQL TIME type.static org.apache.flink.api.common.typeinfo.TypeInformation<Timestamp>SQL_TIMESTAMP()Deprecated.Returns type information for a Table API SQL timestamp or SQL TIMESTAMP type.static org.apache.flink.api.common.typeinfo.TypeInformation<String>STRING()Deprecated.Returns type information for a Table API string or SQL VARCHAR type.
-
-
-
Method Detail
-
STRING
public static org.apache.flink.api.common.typeinfo.TypeInformation<String> STRING()
Deprecated.Returns type information for a Table API string or SQL VARCHAR type.
-
BOOLEAN
public static org.apache.flink.api.common.typeinfo.TypeInformation<Boolean> BOOLEAN()
Deprecated.Returns type information for a Table API boolean or SQL BOOLEAN type.
-
BYTE
public static org.apache.flink.api.common.typeinfo.TypeInformation<Byte> BYTE()
Deprecated.Returns type information for a Table API byte or SQL TINYINT type.
-
SHORT
public static org.apache.flink.api.common.typeinfo.TypeInformation<Short> SHORT()
Deprecated.Returns type information for a Table API short or SQL SMALLINT type.
-
INT
public static org.apache.flink.api.common.typeinfo.TypeInformation<Integer> INT()
Deprecated.Returns type information for a Table API integer or SQL INT/INTEGER type.
-
LONG
public static org.apache.flink.api.common.typeinfo.TypeInformation<Long> LONG()
Deprecated.Returns type information for a Table API long or SQL BIGINT type.
-
FLOAT
public static org.apache.flink.api.common.typeinfo.TypeInformation<Float> FLOAT()
Deprecated.Returns type information for a Table API float or SQL FLOAT/REAL type.
-
DOUBLE
public static org.apache.flink.api.common.typeinfo.TypeInformation<Double> DOUBLE()
Deprecated.Returns type information for a Table API integer or SQL DOUBLE type.
-
DECIMAL
public static org.apache.flink.api.common.typeinfo.TypeInformation<BigDecimal> DECIMAL()
Deprecated.Returns type information for a Table API big decimal or SQL DECIMAL type.
-
SQL_DATE
public static org.apache.flink.api.common.typeinfo.TypeInformation<Date> SQL_DATE()
Deprecated.Returns type information for a Table API SQL date or SQL DATE type.
-
SQL_TIME
public static org.apache.flink.api.common.typeinfo.TypeInformation<Time> SQL_TIME()
Deprecated.Returns type information for a Table API SQL time or SQL TIME type.
-
SQL_TIMESTAMP
public static org.apache.flink.api.common.typeinfo.TypeInformation<Timestamp> SQL_TIMESTAMP()
Deprecated.Returns type information for a Table API SQL timestamp or SQL TIMESTAMP type.
-
LOCAL_DATE
public static org.apache.flink.api.common.typeinfo.TypeInformation<LocalDate> LOCAL_DATE()
Deprecated.Returns type information for a Table API LocalDate type.
-
LOCAL_TIME
public static org.apache.flink.api.common.typeinfo.TypeInformation<LocalTime> LOCAL_TIME()
Deprecated.Returns type information for a Table API LocalTime type.
-
LOCAL_DATE_TIME
public static org.apache.flink.api.common.typeinfo.TypeInformation<LocalDateTime> LOCAL_DATE_TIME()
Deprecated.Returns type information for a Table API LocalDateTime type.
-
INTERVAL_MONTHS
public static org.apache.flink.api.common.typeinfo.TypeInformation<Integer> INTERVAL_MONTHS()
Deprecated.Returns type information for a Table API interval of months.
-
INTERVAL_MILLIS
public static org.apache.flink.api.common.typeinfo.TypeInformation<Long> INTERVAL_MILLIS()
Deprecated.Returns type information for a Table API interval of milliseconds.
-
ROW
public static org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.types.Row> ROW(org.apache.flink.api.common.typeinfo.TypeInformation<?>... types)
Deprecated.Returns type information forRowwith fields of the given types.A row is a variable-length, null-aware composite type for storing multiple values in a deterministic field order. Every field can be null regardless of the field's type. The type of row fields cannot be automatically inferred; therefore, it is required to provide type information whenever a row is used.
The schema of rows can have up to
Integer.MAX_VALUEfields, however, all row instances must strictly adhere to the schema defined by the type info.This method generates type information with fields of the given types; the fields have the default names (f0, f1, f2 ..).
- Parameters:
types- The types of the row fields, e.g., Types.STRING(), Types.INT()
-
ROW
public static org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.types.Row> ROW(String[] fieldNames, org.apache.flink.api.common.typeinfo.TypeInformation<?>[] types)
Deprecated.Returns type information forRowwith fields of the given types and with given names.A row is a variable-length, null-aware composite type for storing multiple values in a deterministic field order. Every field can be null independent of the field's type. The type of row fields cannot be automatically inferred; therefore, it is required to provide type information whenever a row is used.
The schema of rows can have up to
Integer.MAX_VALUEfields, however, all row instances must strictly adhere to the schema defined by the type info.- Parameters:
fieldNames- The array of field namestypes- The types of the row fields, e.g., Types.STRING(), Types.INT()
-
PRIMITIVE_ARRAY
public static org.apache.flink.api.common.typeinfo.TypeInformation<?> PRIMITIVE_ARRAY(org.apache.flink.api.common.typeinfo.TypeInformation<?> elementType)
Deprecated.Generates type information for an array consisting of Java primitive elements. The elements do not support null values.- Parameters:
elementType- type of the array elements; e.g. Types.INT()
-
OBJECT_ARRAY
public static <E> org.apache.flink.api.common.typeinfo.TypeInformation<E[]> OBJECT_ARRAY(org.apache.flink.api.common.typeinfo.TypeInformation<E> elementType)
Deprecated.Generates type information for an array consisting of Java object elements. Null values for elements are supported.- Parameters:
elementType- type of the array elements; e.g. Types.INT()
-
MAP
public static <K,V> org.apache.flink.api.common.typeinfo.TypeInformation<Map<K,V>> MAP(org.apache.flink.api.common.typeinfo.TypeInformation<K> keyType, org.apache.flink.api.common.typeinfo.TypeInformation<V> valueType)
Deprecated.Generates type information for a Java HashMap. Null values in keys are not supported. An entry's value can be null.- Parameters:
keyType- type of the keys of the map e.g. Types.STRING()valueType- type of the values of the map e.g. Types.STRING()
-
MULTISET
public static <E> org.apache.flink.api.common.typeinfo.TypeInformation<Map<E,Integer>> MULTISET(org.apache.flink.api.common.typeinfo.TypeInformation<E> elementType)
Deprecated.Generates type information for a Multiset. A Multiset is baked by a Java HashMap and maps an arbitrary key to an integer value. Null values in keys are not supported.- Parameters:
elementType- type of the elements of the multiset e.g. Types.STRING()
-
-