This section discusses the Cirro-provided numeric data_types.

Use this information when declaring column types with the CREATE TABLE statement or casting values to new data_types for use in functions or output.

Promotion

Numeric data_types are subject to “promotion”, meaning that when multiple numeric types appear in an expression, the resulting type will be based on the largest data type in the expression, where “largest” is defined by the number of bytes.

The following table shows the resulting data type when multiple numeric types are present.

Largest Type Resulting Type
DOUBLE DOUBLE
REAL DOUBLE
DECIMAL DECIMAL
BIGINT BIGINT, or DECIMAL if too large for BIGINT
INTEGER INTEGER
SMALLINT INTEGER