• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

tarantool / tarantool / 15205162899
88%

Build:
DEFAULT BRANCH: master
Ran 23 May 2025 08:03AM UTC
Jobs 1
Files 519
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

23 May 2025 07:47AM UTC coverage: 87.493% (-0.02%) from 87.512%
15205162899

push

github

sergepetrenko
box: introduce fixed point decimals

Part of tarantool/tarantool-ee#1188

@TarantoolBot document
Title: Introduce fixed point decimals

Added support for fixed point decimal types `decimal32`, `decimal64`,
`decimal128` and `decimal256`. They differ in number of significant
decimal digits:

- `decimal32`  - 9
- `decimal64`  - 18
- `decimal128` - 38
- `decimal256` - 76

These types also has additional parameter `scale` which defines the
position of decimal point or it can be seen as implied decimal exponent
with value of `-scale`. For example type `decimal32` with `scale = 4`
can represent values from `-99999.9999` to `99999.9999`. And decimal
with `scale = -2` can represent values from `-999999999 * 10^2` to
`999999999 * 10^2`.

Example 1. Creating space with field of fixed decimal type.
```lua
s = box.schema.create_space('test', {format = {
    {'a', 'unsigned'}, {'b', 'decimal32', scale = 4},
}})
```
Decimal values can be created using `decimal` module. It changed to
be able to represent values of new types:

- limitation on exponent is removed
- precision is increased to 76 decimal digits
- printing is done in scientific notation

Example 2. Passing decimal values.
```lua
local decimal = require('decimal')
s = box.schema.create_space('test', {format = {
    {'a', 'unsigned'}, {'b', 'decimal32', scale = 4},
}})
s:create_index('pk')
s:insert({1, decimal.new(13333)})
s:insert({2, decimal.new(0.0017)})
```

70442 of 124189 branches covered (56.72%)

43 of 0 new or added lines in 0 files covered. (NaN%)

48 existing lines in 14 files now uncovered.

103573 of 118378 relevant lines covered (87.49%)

2774021.3 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
1
92.53
0.0% src/box/vinyl.c
1
87.5
-1.59% src/box/xlog.h
1
80.0
-2.05% src/lib/core/clock.c
1
96.55
-1.15% src/lib/core/histogram.c
1
22.64
-0.02% src/lib/uri/uri_parser.c
1
97.41
-0.86% src/lib/vclock/vclock.c
2
95.84
-0.11% src/box/iproto.cc
2
85.13
-0.32% src/lib/core/say.c
3
93.21
-0.15% src/box/sql/build.c
3
94.15
-1.6% src/box/vy_range.c
4
92.92
-0.21% src/lib/core/fiber.c
6
95.2
-1.25% src/box/vy_read_iterator.c
6
94.18
-0.07% src/box/xrow_update_field.c
16
90.91
-0.49% src/box/box.cc
Jobs
ID Job ID Ran Files Coverage
1 15205162899.1 23 May 2025 08:03AM UTC 519
87.49
GitHub Action Run
Source Files on build 15205162899
  • Tree
  • List 519
  • Changed 33
  • Source Changed 0
  • Coverage Changed 33
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 92b31021 on github
  • Prev Build on master (#15160117700)
  • Next Build on master (#15211902240)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc