Impala supports a set of data types that you can use for table columns, expression values, and function arguments and return values.
For the notation to write literals of each of these data types, see Literals.
Impala supports a limited set of implicit casts to avoid undesired results from unexpected casting behavior.
CAST()
for these conversions. SMALLINT
to a BIGINT
or
FLOAT
, but to convert from DOUBLE
to
FLOAT
or INT
to
TINYINT
requires a call to CAST()
in
the query. STRING
to
TIMESTAMP
. Impala has a restricted set of literal
formats for the TIMESTAMP
data type and the
FROM_UNIXTIME()
format string; see TIMESTAMP Data Type for details. See the topics under this section for full details on implicit and
explicit casting for each data type, and see Impala Type Conversion Functions for
details about the CAST()
function.