Data type mapping ensures that data is accurately mapped from the original data type to the target data type when data is exported from OceanBase Database in Parquet or ORC format. In OceanBase Database V4.3.5, a mapping table is provided to map the data types of MySQL and Oracle databases to the data types supported by Parquet or ORC. This ensures that data is not lost, overloaded, or semantically altered during the export process.
| Parquet physical type |
Parquet logical type |
Hive data type |
Data type under Oracle tenant |
Remarks |
| FLOAT |
NONE |
FLOAT |
BINARY_FLOAT |
| DOUBLE |
NONE |
DOUBLE |
BINARY_DOUBLE |
|
| FIXED_LEN_BYTE_ARRAY |
DECIMAL |
DECIMAL |
NUMBER |
You must specify precision and scale. |
| BYTE_ARRAY |
STRING |
CHAR |
CHAR |
Parquet string types are UTF-8 encoded. |
| BYTE_ARRAY |
STRING |
VARCHAR |
VARCHAR2 |
|
| BYTE_ARRAY |
STRING |
STRING |
RAW, BLOB, CLOB |
| INT64 |
TIMESTAMP(is_adjusted_to_utc=false, parquet::LogicalType::TimeUnit::MICROS) |
TIMESTAMP |
DATE |
| INT96 |
NONE |
TIMESTAMP |
TIMESTAMP, TIMESTAMP WITH LOCAL TIME ZONE |
| ORC type |
Hive data type |
Data type under Oracle tenant |
| FLOAT |
FLOAT |
BINARY_FLOAT |
| DOUBLE |
DOUBLE |
BINARY_DOUBLE |
| DECIMAL |
DECIMAL |
NUMBER |
| CHAR |
CHAR |
CHAR |
| VARCHAR |
VARCHAR |
VARCHAR2 |
| STRING |
STRING |
CLOB |
| BINARY |
BINARY |
BLOB/RAW |
| TIMESTAMP |
TIMESTAMP |
DATE/TIMESTAMP/TIMESTAMP WITH LOCAL TIME ZONE |
References
SELECT INTO