Oracle NUMBER Data Types and TDV Data Types

Static Mapping

The following details apply to the mapping of Oracle NUMBER data types to TDV data types:

  • The NUMBER data type is mapped to arbitrary Numeric in TDV.

  • You may change this behavior by setting the Oracle-specific property "Arbitrary Numeric" to False. You can tune this via Administration -> Configuration -> Data sources -> Oracle Sources -> Arbitrary NUMERIC. By default, this is TRUE. When False, then:

    • If the scale of the NUMBER column is not specified, it is mapped as DOUBLE.

    • If the either the precision or the scale is NULL, the data type is mapped to DOUBLE.

  • When casting a value as DECIMAL(p, s), (for example, CAST (Oracle_column AS DECIMAL(40)):

    • Where the precision (p) is greater than 38, it is processed in TDV.

    • The maximum precision supported in TDV is Integer.MAX_VALUE, which is 2147483647.

    • The maximum scale that TDV supports is 255.

    • Any scale larger than 255 is automatically reduced to 255.

Results Mapping

Oracle has no SQL-standard equivalent of INTEGER. An INTEGER in Oracle is NUMBER(38), but division results in an arbitrary NUMBER value (for example, 32/5 will 6.4).