Understanding Hive data types
Hive data types are categorized into two types: primitive and complex data types. String and integer are the most useful primitive types, which are supported by most Hive functions.
Tip
Downloading the example code
You can download the example code files from your account at http://www.packtpub.com for all the Packt Publishing books you have purchased. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you
The details of primitive types are as follows:
Primitive data type |
Description |
Example |
---|---|---|
|
It has 1 byte from -128 to 127. The postfix is Y. It is used as a small range of numbers. |
10Y |
|
It has 2 bytes from -32,768 to 32,767. The postfix is S. It is used as a regular descriptive number. |
10S |
|
It has 4 bytes from -2,147,483,648 to 2,147,483,647. |
10 |
|
It has 8 bytes from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807. The postfix... |