tarantool / tarantool/doc

`double` field type new behaviour

Open
#4,768 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

3.4 sql
Dominant language
CSS
Stars
15
Forks
49
Avg merge
1d 13h
Merged PRs (30d)
3

Description

Related dev. issue(s): https://github.com/tarantool/tarantool/issues/9965
Product: Tarantool
Since: 3.4
Root document:

SME: @ Gerold103

Details

Double field type now is identical to number. I.e. it can
store integers and compares them as integers.

  • Reference -> SQL reference -> SQL user guide:
    DOUBLE values are numerics that do contain decimal points (for
    example 0.5) or are expressed with exponential notation (for
    example 5E-1)
    -> now DOUBLE can have any numbers, including
    integers. It becomes identical to NUMBER.

  • Platform -> Defining and manipulating data -> Data storage:
    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 cdata values
    with double floating-point numbers
    -> not so anymore.
    double field is now identical to number (it can store
    integers too, and compares them like integers).

Requested by @ Gerold103 in https://github.com/tarantool/tarantool/commit/60272e8292ad5a893cc14d0318a30f5cfabb6495.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the SQL data type and Data storage root documents linked in the issue. Check each statement about DOUBLE values, storage encoding, and Lua field values against the behavior described here. Done means both pages accurately state that double accepts integers and is identical to number, including integer comparisons.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
databases, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.