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

tarantool / tarantool / 5477016912
86%
master: 88%

Build:
Build:
LAST BUILD BRANCH: gh-12343
DEFAULT BRANCH: master
Ran 06 Jul 2023 03:19PM UTC
Jobs 1
Files 476
Run time 13s
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

06 Jul 2023 03:00PM UTC coverage: 85.781% (+0.005%) from 85.776%
5477016912

push

github

alyapunov
box: compare and hash msgpack value of double key field as double

1. Make double-formatted fields accept integer and float values.
2. Make indexes compare the values as double if the field key type
   is FIELD_TYPE_DOUBLE.
3. Make hashers cast double key field to double before hashing, so
   we are able to insert and select any int, uint, float or double
   if their value casted to double is equal (for double keys).

Notes about tuple_compare.cc:

Since now `mp_compare_double` casts any value placed in field to
double it was renamed to `mp_compare_as_double` to not semantically
conflict with existing `mp_compare_double_*` functions.

Notes about tuple_hash.cc:

The hashee cast result is encoded in MP_DOUBLE and hashed for
backward compatibility reasons.

Since now the field hashing function (tuple_hash_field) requires
field type to hash the field correctly, a new parameter has been
introduced.

By the way added assertions to the generic `field_hash` to prevent
invalid hashing for new precompiled hashers and made
`key_hash_slowpath` static cause it's only used in this file.

Closes #7483
Closes #5933
Unblocks tarantool/crud#298

@TarantoolBot document
Title: It's not required to ffi-cast integral floating point to
double anymore.

The page describing tarantool data model states that:

> In Lua, fields of the double type can only contain non-integer
> numeric values...

If the patch is merged this isn't the case anymore, so this
statement and the code snippet below it should be updated.

Link to the document: [Data storage](https://www.tarantool.io/en/doc/latest/concepts/data_model/value_store/#field-type-details).

Affected segments:

> double. The double field type exists mainly to be equivalent
> to Tarantool/SQL’s DOUBLE data type. In msgpuck.h (Tarantool’s
> interface to MsgPack), the storage type is MP_DOUBLE and the
> size of the encoded value is always 9 bytes. In Lua, fields of
> the double type can only contain non-integer numeric values and
... (continued)

62199 of 114064 branches covered (54.53%)

22 of 22 new or added lines in 2 files covered. (100.0%)

93167 of 108610 relevant lines covered (85.78%)

3024110.12 hits per line

Jobs
ID Job ID Ran Files Coverage
1 5477016912.1 06 Jul 2023 03:19PM UTC 0
85.78
GitHub Action Run
Source Files on build 5477016912
Detailed source file information is not available for this build.
  • Back to Repo
  • 45044d20 on github
  • Prev Build on release/2.11 (#5473242027)
  • Next Build on release/2.11 (#5531420381)
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