Hive 0.13 Feature: CHAR
Data Type Support
Hive 0.13 supports the CHAR
data type, which greatly 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. Users
performing data migration to Hive are encouraged to consult the following table before performing the
migration to avoid unexpected behavior with values for CHAR, VARCHAR, and STRING data types.
The following table describes how several databases treat trailing whitespaces for the CHAR, VARCHAR, and STRING data types:
Table 2.5. Trailing Whitespace Characters on Various Databases
Data Type | Hive | Oracle | SQL Server | MySQL | Teradata |
---|---|---|---|---|---|
CHAR | Ignore | Ignore | Ignore | Ignore | Ignore |
VARCHAR | Compare | Compare | Configurable | Ignore | Ignore |
STRING | Compare | N/A | N/A | N/A | N/A |