This is the documentation for CDH 5.1.x. Documentation for other versions is available at Cloudera Documentation.

INT Data Type

A 4-byte integer data type used in CREATE TABLE and ALTER TABLE statements.

Range: -2147483648 .. 2147483647. There is no UNSIGNED subtype.

Conversions: Impala automatically converts to a larger integer type (BIGINT) or a floating-point type (FLOAT or DOUBLE) automatically. Use CAST() to convert to TINYINT, SMALLINT, STRING, or TIMESTAMP. Casting an integer value N to TIMESTAMP produces a value that is N seconds past the start of the epoch date (January 1, 1970).

The data type INTEGER is an alias for INT.

Examples:

CREATE TABLE t1 (x INT);
SELECT CAST(1000 AS INT);

Related information: Literals, TINYINT Data Type, BIGINT Data Type, SMALLINT Data Type, TINYINT Data Type, Mathematical Functions

Page generated September 3, 2015.