REAL Data Type

An alias for the DOUBLE data type. See DOUBLE Data Type for details.

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.

  1. [localhost:21000] > create table r1 (x real);
  2. [localhost:21000] > describe r1;
  3. +------+--------+---------+
  4. | name | type | comment |
  5. +------+--------+---------+
  6. | x | double | |
  7. +------+--------+---------+
  8. [localhost:21000] > insert into r1 values (1.5), (cast (2.2 as double));
  9. [localhost:21000] > select cast (1e6 as real);
  10. +---------------------------+
  11. | cast(1000000.0 as double) |
  12. +---------------------------+
  13. | 1000000 |
  14. +---------------------------+

Parent topic: Data Types