REAL data type
An alias for the DOUBLE
data type.
Examples:
These examples show how you can use the type names REAL
and DOUBLE
interchangeably, and behind the scenes Impala treats them always as DOUBLE
.
[localhost:21000] > create table r1 (x real);
[localhost:21000] > describe r1;
+------+--------+---------+
| name | type | comment |
+------+--------+---------+
| x | double | |
+------+--------+---------+
[localhost:21000] > insert into r1 values (1.5), (cast (2.2 as double));
[localhost:21000] > select cast (1e6 as real);
+---------------------------+
| cast(1000000.0 as double) |
+---------------------------+
| 1000000 |
+---------------------------+