Datatypes in apache hive
What are the most common datatypes we used in apache hive, in this tutorial you will find the list of datatypes that are most common in use!
Hive supports Primitive Data Types
It’s a 1 byte integer.
It’s a 2 byte integer
It’s a 4 byte integer
It’s a 8 byte integer
This is either TRUE or FALSE
It’s a floating point number example – 9.9999
It’s again double floating number – 9.9999
It’s a most commonly used and most popular datatype in hive, it’s a sequence of character and both single and double quoted string is supported in hive.
Time stamp is support from version 8 onwards, mostly JDBC date format YYYY-MM-DD hh:mm:ss.fffffffff
This is also a new datatype supported from hive version 8 onwards, it basically stores array of bytes data.
There are some other complex datatypes also supported by hive like
It’s a similar like C STRUCT and fields can be access using dot notation
It is useful in storing key value pair data. We called it is a collection of key-value tuples.
Arrays are sequence of same types that is it can be string array or integer array, first value of this array is starts with zero-based index.
RECOMMENDED BOOK: PROGRAMMING HIVE