Tarantool development patches archive
 help / color / mirror / Atom feed
* [tarantool-patches] [PATCH 0/6] Introduce UNSIGNED type in SQL
@ 2019-06-07 15:37 Nikita Pettik
  2019-06-07 15:37 ` [tarantool-patches] [PATCH 1/6] sql: refactor sql_atoi64() Nikita Pettik
                   ` (6 more replies)
  0 siblings, 7 replies; 49+ messages in thread
From: Nikita Pettik @ 2019-06-07 15:37 UTC (permalink / raw)
  To: tarantool-patches; +Cc: v.shpilevoy, Nikita Pettik

Branch: https://github.com/tarantool/tarantool/tree/np/introduce-uint
Issues:
https://github.com/tarantool/tarantool/issues/3810
https://github.com/tarantool/tarantool/issues/4015

Current patch-set allows using UNSIGNED as a column type and operating
on integer values in range up to [2^64 - 1]. This means that result of
all basic routines such as arithmetic operations and built-in functions
is extended to unsigned range.
The basic idea under the hood is separating storing positive and
negative integers into different memory cells. We've added new
type of VDBE memory - MEM_UInt. Now all positive values are stored with
featuring this flag; in turn, negative integers have MEM_Int type.
It's quite similar to MP_* format types.

For more details see content of patches.

Nikita Pettik (6):
  sql: refactor sql_atoi64()
  sql: separate VDBE memory holding positive and negative ints
  sql: refactor arithmetic operations to support unsigned ints
  sql: make built-in functions operate on unsigned values
  sql: introduce extended range for INTEGER type
  sql: allow to specify UNSIGNED column type

 extra/mkkeywordhash.c                      |   1 +
 src/box/bind.c                             |  13 +-
 src/box/bind.h                             |   1 +
 src/box/errcode.h                          |   2 +-
 src/box/execute.c                          |  19 +-
 src/box/lua/execute.c                      |   9 +-
 src/box/lua/lua_sql.c                      |   3 +
 src/box/sql/build.c                        |   4 +-
 src/box/sql/expr.c                         |  68 ++--
 src/box/sql/func.c                         |  92 ++---
 src/box/sql/main.c                         |   3 +-
 src/box/sql/parse.y                        |   1 +
 src/box/sql/pragma.c                       |   2 +-
 src/box/sql/sqlInt.h                       |  97 ++---
 src/box/sql/sqlLimit.h                     |   9 +
 src/box/sql/util.c                         | 371 +++++++++---------
 src/box/sql/vdbe.c                         | 268 ++++++++-----
 src/box/sql/vdbe.h                         |   3 +-
 src/box/sql/vdbeInt.h                      |  19 +-
 src/box/sql/vdbeapi.c                      |  52 ++-
 src/box/sql/vdbeaux.c                      |  60 ++-
 src/box/sql/vdbemem.c                      | 149 ++++----
 test/sql-tap/cast.test.lua                 |   8 +-
 test/sql-tap/check.test.lua                |   2 +-
 test/sql-tap/cse.test.lua                  |   6 +-
 test/sql-tap/default.test.lua              |   2 +-
 test/sql-tap/fkey2.test.lua                |   4 +-
 test/sql-tap/func.test.lua                 |  46 ++-
 test/sql-tap/hexlit.test.lua               |   2 +-
 test/sql-tap/position.test.lua             |   2 +-
 test/sql-tap/sql-errors.test.lua           |   4 +-
 test/sql-tap/table.test.lua                |   2 +-
 test/sql-tap/tkt3493.test.lua              |   4 +-
 test/sql/bind.result                       |  46 ++-
 test/sql/bind.test.lua                     |   4 +
 test/sql/gh-2347-max-int-literals.result   |  39 --
 test/sql/gh-2347-max-int-literals.test.lua |  11 -
 test/sql/integer-overflow.result           |  77 +++-
 test/sql/integer-overflow.test.lua         |  10 +
 test/sql/iproto.result                     |   6 +-
 test/sql/types.result                      | 587 ++++++++++++++++++++++++++++-
 test/sql/types.test.lua                    | 115 ++++++
 42 files changed, 1602 insertions(+), 621 deletions(-)
 delete mode 100644 test/sql/gh-2347-max-int-literals.result
 delete mode 100644 test/sql/gh-2347-max-int-literals.test.lua

-- 
2.15.1

^ permalink raw reply	[flat|nested] 49+ messages in thread

end of thread, other threads:[~2019-08-06 19:36 UTC | newest]

Thread overview: 49+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-07 15:37 [tarantool-patches] [PATCH 0/6] Introduce UNSIGNED type in SQL Nikita Pettik
2019-06-07 15:37 ` [tarantool-patches] [PATCH 1/6] sql: refactor sql_atoi64() Nikita Pettik
2019-06-11 21:11   ` [tarantool-patches] " Vladislav Shpilevoy
2019-07-01 14:20     ` n.pettik
2019-07-01 21:53       ` Vladislav Shpilevoy
2019-07-05 16:32         ` n.pettik
2019-06-07 15:37 ` [tarantool-patches] [PATCH 2/6] sql: separate VDBE memory holding positive and negative ints Nikita Pettik
2019-06-11 21:11   ` [tarantool-patches] " Vladislav Shpilevoy
2019-07-01 14:21     ` n.pettik
2019-07-01 21:53       ` Vladislav Shpilevoy
2019-07-05 16:33         ` n.pettik
2019-06-07 15:37 ` [tarantool-patches] [PATCH 3/6] sql: refactor arithmetic operations to support unsigned ints Nikita Pettik
2019-06-11 21:11   ` [tarantool-patches] " Vladislav Shpilevoy
2019-07-01 14:21     ` n.pettik
2019-07-01 21:53       ` Vladislav Shpilevoy
2019-07-05 16:36         ` n.pettik
2019-07-10 22:49           ` Vladislav Shpilevoy
2019-07-17 12:24             ` n.pettik
2019-06-07 15:37 ` [tarantool-patches] [PATCH 4/6] sql: make built-in functions operate on unsigned values Nikita Pettik
2019-06-11 21:11   ` [tarantool-patches] " Vladislav Shpilevoy
2019-07-01 14:21     ` n.pettik
2019-07-01 21:53       ` Vladislav Shpilevoy
2019-07-05 16:36         ` n.pettik
2019-07-10 22:49           ` Vladislav Shpilevoy
2019-07-17  0:53             ` n.pettik
2019-06-07 15:37 ` [tarantool-patches] [PATCH 5/6] sql: introduce extended range for INTEGER type Nikita Pettik
2019-06-11 21:11   ` [tarantool-patches] " Vladislav Shpilevoy
2019-07-01 14:21     ` n.pettik
2019-07-01 21:53       ` Vladislav Shpilevoy
2019-07-24 15:59   ` Konstantin Osipov
2019-07-24 16:54     ` n.pettik
2019-07-24 17:09       ` Konstantin Osipov
2019-06-07 15:37 ` [tarantool-patches] [PATCH 6/6] sql: allow to specify UNSIGNED column type Nikita Pettik
2019-07-01 21:53   ` [tarantool-patches] " Vladislav Shpilevoy
2019-07-05 16:36     ` n.pettik
2019-07-10 22:49       ` Vladislav Shpilevoy
2019-07-11 21:25         ` Vladislav Shpilevoy
2019-07-17  0:53           ` n.pettik
2019-07-18 20:18             ` Vladislav Shpilevoy
2019-07-18 20:56               ` n.pettik
2019-07-18 21:08                 ` Vladislav Shpilevoy
2019-07-18 21:13                   ` Vladislav Shpilevoy
2019-07-22 10:20                     ` n.pettik
2019-07-22 19:17                       ` Vladislav Shpilevoy
2019-07-22 10:20                   ` n.pettik
2019-07-17  0:54         ` n.pettik
2019-07-18 20:18           ` Vladislav Shpilevoy
2019-08-06 19:36         ` n.pettik
2019-07-24 13:01 ` [tarantool-patches] Re: [PATCH 0/6] Introduce UNSIGNED type in SQL Kirill Yukhin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox