DataType#
The DataType class provides factory methods for creating data types
used in schema definitions, UDF return types, and other type specifications in the DataFrame API.
Example:
>>> from pyflink.dataframe import DataType
>>> schema = {"id": DataType.int64(), "name": DataType.string(), "score": DataType.float64()}
|
DataType for DataFrame API. |
Return a non-nullable version of this type. |
|
Return a nullable version of this type. |
|
8-bit signed integer type (TINYINT). |
|
16-bit signed integer type (SMALLINT). |
|
32-bit signed integer type (INT). |
|
64-bit signed integer type (BIGINT). |
|
32-bit floating point type (FLOAT). |
|
64-bit floating point type (DOUBLE). |
|
|
Decimal type with specified precision and scale. |
Variable-length string type (VARCHAR). |
|
|
Fixed-length character type (CHAR(n)). |
Variant type that can store a value of any type. |
|
Binary type (BYTES). |
|
|
Fixed-length binary type (BINARY(n)). |
Null type (NULL). |
|
Boolean type. |
|
Date type (year, month, day). |
|
|
Time type (hour, minute, second, fractional seconds). |
|
Timestamp type without time zone. |
|
Timestamp type with local time zone. |
|
List type with element type. |
|
Map type with key and value types. |
|
Struct/Row type with named fields. |
|
Fixed-shape tensor type. |