Skip to content

FixedDecimal128 #89

@javier

Description

@javier

We are settled on FixedDecimal128 - 128-bit integer backed decimal with fixed scale. Scale value is stored in column metadata. This type will support the following arithmetic operations:

  • addition
  • subtraction
  • multiplication
  • division

These operations will be able to temporarily increase the storage during calculations to avoid numeric overflows while performing arithmetic on values with vastly different scale.

Operations will also avoid rounding issues typically associated with IEEE754 and will perform very closely to the expected accuracy.

While computation is extremely optimised, it will be much slower than for the existing DOUBLE type. This is due to DOUBLE being supported by CPU hardware, while FixedDecimal128 operations are emulated in QuestDB code.

questdb/questdb#4504
questdb/questdb#1565

Metadata

Metadata

Assignees

No one assigned

    Labels

    SQLSQL engine featuresopen sourceOpen source featuresstorageStorage engine core features

    Projects

    Status

    Shipped

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions