HDP Data Services
Also available as:
PDF

CHAR Data Type Support

Hive 0.13 supports The CHAR data type is supported in Hive 0.13 and later. This data type simplifies the process of migrating data from other databases. Hive ignores trailing whitespace characters for the CHAR data type. However, there is no consensus among database vendors on the handling of trailing whitespaces. Before you perform a data migration to Hive, consult the following table to avoid unexpected behavior with values for CHAR, VARCHAR, and STRING data types.

The following table describes how several types of databases treat trailing whitespaces for the CHAR, VARCHAR, and STRING data types:

Table 2.5. Trailing Whitespace Characters on Various Databases

Data TypeHiveOracleSQL ServerMySQLTeradata

CHAR

Ignore

Ignore

Ignore

Ignore

Ignore

VARCHAR

Compare

Compare

Configurable

Ignore

Ignore

STRING

Compare

N/A

N/A

N/A

N/A