
Apache Hive Cookbook
By :

Hive supports three types of String data type, STRING
, VARCHAR
, and CHAR
:
STRING: It is a sequence of characters that can be expressed using single quotes ('
) as well as double quotes ("
).
VARCHAR: It is variable-length character type. It is defined using a length specifier, which specifies the maximum number of characters allowed in the character string. Its syntax is VARCHAR(max_length)
. The value of the varchar
data type gets truncated during processing if necessary to fit within the specified length. While converting the string value to the varchar
value, if a string value exceeds the length specifier, then the string gets silently truncated. The maximum length of varchar
type is 65355
.
CHAR: It is fixed-length character type. It is defined in the same way as the varchar
type. If the value is shorter as compared with the specified length, then the value is padded with trailing spaces to achieve the specified length. The maximum length of the char
type is 255.
Change the font size
Change margin width
Change background colour