Tarantool development patches archive
 help / color / mirror / Atom feed
* [tarantool-patches] [PATCH v2 00/12] sql: uniform SQL and Lua functions subsystem
@ 2019-07-10 11:00 Kirill Shcherbatov
  2019-07-10 11:00 ` [tarantool-patches] [PATCH v2 01/12] sql: get rid of SOUNDEX, MATCH Kirill Shcherbatov
                   ` (11 more replies)
  0 siblings, 12 replies; 35+ messages in thread
From: Kirill Shcherbatov @ 2019-07-10 11:00 UTC (permalink / raw)
  To: tarantool-patches, korablev; +Cc: kostja, Kirill Shcherbatov

This patchset reworks SQL functions subsystem. Previously Tarantool's
SQL used an own FuncDef function representation and corresponding
FuncDef cache. Replacing it with Tarantool's uniform function
representation makes possible to call any function on any supported
language in SQL.

The commit 'introduce Lua persistent functions' has been reviewed by
Vova in past, but reverted by Kostya, becuase it introduces schema
changes making sense in scope of this new patchset. Mostly it should be
good enough.

Please pay attention, that it updates test-run module and an
pretest_cleanup updates must be merged before it.

Changes in version 2:
  - patches are reordered in the patchset
  - fixed compilation
  - dropped _sql_record entry, introduced GREATER, LESSER entries
  - few minor fixes

Branch: http://github.com/tarantool/tarantool/tree/kshch/gh-4182-persistent-functions
Issue: https://github.com/tarantool/tarantool/issues/4182

Kirill Shcherbatov (12):
  sql: get rid of SOUNDEX, MATCH
  sql: get rid of LIKELY, UNLIKELY and LIKEHOOD
  sql: put analyze helpers to FuncDef cache
  sql: rework LIKE case-insensitive mode
  sql: replace bool is_derived_coll marker with flag
  sql: remove SQL_PreferBuiltin flag
  sql: move LIKE UConverter object to collation library
  sql: rfc for SQL and Lua functions
  box: introduce Lua persistent functions
  sql: refactor builtins signatures with port
  box: use own vtab per each function object
  sql: use schema's func hash instead of FuncDef hash

 doc/rfc/4182-persistent-lua-functions.md |  214 +++
 src/box/CMakeLists.txt                   |    1 -
 src/box/alter.cc                         |  155 +-
 src/box/bootstrap.                       |  Bin 0 -> 5528 bytes
 src/box/bootstrap.snap                   |  Bin 4475 -> 5794 bytes
 src/box/call.c                           |    1 +
 src/box/execute.c                        |    2 +
 src/box/func.c                           |   31 +-
 src/box/func.h                           |    7 +-
 src/box/func_def.c                       |   43 +-
 src/box/func_def.h                       |   61 +-
 src/box/lua/call.c                       |  249 ++-
 src/box/lua/lua_sql.c                    |  204 ---
 src/box/lua/lua_sql.h                    |   39 -
 src/box/lua/schema.lua                   |   21 +-
 src/box/lua/upgrade.lua                  |   67 +-
 src/box/port.c                           |    5 +
 src/box/port.h                           |   19 +
 src/box/schema_def.h                     |   14 +
 src/box/sql.h                            |   18 +
 src/box/sql/analyze.c                    |  174 +-
 src/box/sql/callback.c                   |  211 ---
 src/box/sql/date.c                       |   28 -
 src/box/sql/expr.c                       |   77 +-
 src/box/sql/func.c                       | 2117 ++++++++++++++--------
 src/box/sql/global.c                     |    7 -
 src/box/sql/main.c                       |  160 +-
 src/box/sql/pragma.c                     |    8 -
 src/box/sql/printf.c                     |    7 +-
 src/box/sql/resolve.c                    |  107 +-
 src/box/sql/select.c                     |   10 +-
 src/box/sql/sqlInt.h                     |  258 +--
 src/box/sql/vdbe.c                       |  112 +-
 src/box/sql/vdbe.h                       |    6 +-
 src/box/sql/vdbeInt.h                    |   38 +-
 src/box/sql/vdbeapi.c                    |  194 +-
 src/box/sql/vdbeaux.c                    |   31 +-
 src/box/sql/vdbemem.c                    |  144 +-
 src/box/sql/where.c                      |  166 +-
 src/box/sql/whereInt.h                   |    1 -
 src/box/sql/whereexpr.c                  |   10 +-
 src/lib/coll/coll.c                      |    8 +-
 src/lib/coll/coll.h                      |    2 +
 src/lib/core/port.h                      |   31 +
 test-run                                 |    2 +-
 test/box-py/bootstrap.result             |   76 +-
 test/box-py/bootstrap.test.py            |    2 +-
 test/box/access.result                   |    2 +-
 test/box/access.test.lua                 |    2 +-
 test/box/access_bin.result               |    2 +-
 test/box/access_bin.test.lua             |    2 +-
 test/box/access_misc.result              |  133 +-
 test/box/access_sysview.result           |    8 +-
 test/box/alter.result                    |    2 +-
 test/box/function1.result                |  392 +++-
 test/box/function1.test.lua              |  133 +-
 test/sql-tap/alias.test.lua              |   11 +-
 test/sql-tap/check.test.lua              |   13 +-
 test/sql-tap/collation.test.lua          |    2 +-
 test/sql-tap/e_expr.test.lua             |   26 +-
 test/sql-tap/func.test.lua               |   75 +-
 test/sql-tap/func3.test.lua              |  289 ---
 test/sql-tap/func5.test.lua              |   29 +-
 test/sql-tap/lua_sql.test.lua            |  120 +-
 test/sql-tap/orderby5.test.lua           |    2 +-
 test/sql-tap/select4.test.lua            |   12 +-
 test/sql-tap/sql-errors.test.lua         |   12 +-
 test/sql-tap/subquery.test.lua           |   21 +-
 test/sql-tap/trigger9.test.lua           |    6 +-
 test/sql-tap/where2.test.lua             |    4 +-
 test/sql-tap/whereG.test.lua             |   87 +-
 test/sql/errinj.result                   |   25 -
 test/sql/errinj.test.lua                 |   10 -
 test/sql/func-recreate.result            |   41 +-
 test/sql/func-recreate.test.lua          |   28 +-
 test/wal_off/func_max.result             |    8 +-
 76 files changed, 3653 insertions(+), 2982 deletions(-)
 create mode 100644 doc/rfc/4182-persistent-lua-functions.md
 create mode 100644 src/box/bootstrap.
 delete mode 100644 src/box/lua/lua_sql.c
 delete mode 100644 src/box/lua/lua_sql.h
 delete mode 100755 test/sql-tap/func3.test.lua

-- 
2.21.0

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

end of thread, other threads:[~2019-07-13 14:17 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-10 11:00 [tarantool-patches] [PATCH v2 00/12] sql: uniform SQL and Lua functions subsystem Kirill Shcherbatov
2019-07-10 11:00 ` [tarantool-patches] [PATCH v2 01/12] sql: get rid of SOUNDEX, MATCH Kirill Shcherbatov
2019-07-10 18:45   ` [tarantool-patches] " Konstantin Osipov
2019-07-12  8:44   ` Kirill Yukhin
2019-07-10 11:00 ` [tarantool-patches] [PATCH v2 10/12] sql: refactor builtins signatures with port Kirill Shcherbatov
2019-07-10 18:47   ` [tarantool-patches] " Konstantin Osipov
2019-07-11  7:33     ` Kirill Shcherbatov
2019-07-10 11:00 ` [tarantool-patches] [PATCH v2 11/12] box: use own vtab per each function object Kirill Shcherbatov
2019-07-10 11:01 ` [tarantool-patches] [PATCH v2 12/12] sql: use schema's func hash instead of FuncDef hash Kirill Shcherbatov
2019-07-10 20:22   ` [tarantool-patches] " Konstantin Osipov
2019-07-10 11:01 ` [tarantool-patches] [PATCH v2 02/12] sql: get rid of LIKELY, UNLIKELY and LIKEHOOD Kirill Shcherbatov
2019-07-10 19:02   ` [tarantool-patches] " Konstantin Osipov
2019-07-11  7:38     ` Kirill Shcherbatov
2019-07-10 11:01 ` [tarantool-patches] [PATCH v2 03/12] sql: put analyze helpers to FuncDef cache Kirill Shcherbatov
2019-07-10 19:04   ` [tarantool-patches] " Konstantin Osipov
2019-07-12  8:47   ` Kirill Yukhin
2019-07-10 11:01 ` [tarantool-patches] [PATCH v2 04/12] sql: rework LIKE case-insensitive mode Kirill Shcherbatov
2019-07-10 19:09   ` [tarantool-patches] " Konstantin Osipov
2019-07-10 11:01 ` [tarantool-patches] [PATCH v2 05/12] sql: replace bool is_derived_coll marker with flag Kirill Shcherbatov
2019-07-10 19:10   ` [tarantool-patches] " Konstantin Osipov
2019-07-12  8:48   ` Kirill Yukhin
2019-07-10 11:01 ` [tarantool-patches] [PATCH v2 06/12] sql: remove SQL_PreferBuiltin flag Kirill Shcherbatov
2019-07-10 19:11   ` [tarantool-patches] " Konstantin Osipov
2019-07-10 11:01 ` [tarantool-patches] [PATCH v2 07/12] sql: move LIKE UConverter object to collation library Kirill Shcherbatov
2019-07-12  8:49   ` [tarantool-patches] " Kirill Yukhin
2019-07-10 11:01 ` [tarantool-patches] [PATCH v2 08/12] sql: rfc for SQL and Lua functions Kirill Shcherbatov
2019-07-10 19:17   ` [tarantool-patches] " Konstantin Osipov
2019-07-10 19:18     ` Konstantin Osipov
2019-07-11  7:40       ` Kirill Shcherbatov
2019-07-11 13:59   ` Kirill Yukhin
2019-07-10 11:01 ` [tarantool-patches] [PATCH v2 09/12] box: introduce Lua persistent functions Kirill Shcherbatov
2019-07-10 19:26   ` [tarantool-patches] " Konstantin Osipov
2019-07-12 21:49   ` Konstantin Osipov
2019-07-13 13:55     ` Kirill Yukhin
2019-07-13 14:17       ` Kirill Yukhin

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