Using numeric data types
Hive supports a set of data types that can be used for table columns, expression values, and function arguments, and return values.
In the following table, primitive numeric data types are listed with sizes and examples:
Data Type |
Size |
Example |
---|---|---|
|
1-byte signed integer |
50 |
|
2-byte signed integer |
20,000 |
|
4-byte signed integer |
1,000 |
|
8-byte signed integer |
50,000 |
|
4-byte single-precision floating point |
400.50 |
|
8-byte double-precision floating point |
20,000.50 |
|
17-byte precision up to 38 digits |
|
By default, all integral literals are treated as the INT
values until they cross the range of INT
values. If some integral literal crosses the range of the INT ...
Get Apache Hive Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.