Tarantool development patches archive
 help / color / mirror / Atom feed
From: Kirill Shcherbatov <kshcherbatov@tarantool.org>
To: tarantool-patches@freelists.org, korablev@tarantool.org
Cc: kostja@tarantool.org, vdavydov.dev@gmail.com,
	Kirill Shcherbatov <kshcherbatov@tarantool.org>
Subject: [PATCH v1 00/12] sql: uniform SQL and Lua functions subsystem
Date: Mon,  8 Jul 2019 14:26:14 +0300	[thread overview]
Message-ID: <cover.1562584567.git.kshcherbatov@tarantool.org> (raw)

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.

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

Kirill Shcherbatov (12):
  sql: rfc for SQL and Lua functions
  sql: get rid of SOUNDEX, MATCH
  sql: get rid of LIKELY, UNLIKELY and LIKEHOOD
  box: introduce Lua persistent functions
  sql: put analyze helpers to FuncDef cache
  sql: rework LIKE case-insensitive mode
  sql: replace bool is_derived_coll marker with flag
  sql: refactor builtins signatures with port
  box: use own vtab per each function object
  sql: remove SQL_PreferBuiltin flag
  sql: move LIKE UConverter object to collation library
  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 -> 5541 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                  |   63 +-
 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                    |  222 ++-
 src/box/sql/callback.c                   |  211 ---
 src/box/sql/date.c                       |   28 -
 src/box/sql/expr.c                       |   77 +-
 src/box/sql/func.c                       | 2115 ++++++++++++++--------
 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                     |  262 +--
 src/box/sql/vdbe.c                       |   97 +-
 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             |   12 +-
 test/box-py/bootstrap.test.py            |    2 +-
 test/box/access_misc.result              |   10 +-
 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 +-
 70 files changed, 3498 insertions(+), 2963 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

             reply	other threads:[~2019-07-08 11:26 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-08 11:26 Kirill Shcherbatov [this message]
2019-07-08 11:26 ` [PATCH v1 01/12] sql: rfc for SQL and Lua functions Kirill Shcherbatov
2019-07-08 11:26 ` [PATCH v1 10/12] sql: remove SQL_PreferBuiltin flag Kirill Shcherbatov
2019-07-08 11:26 ` [PATCH v1 11/12] sql: move LIKE UConverter object to collation library Kirill Shcherbatov
2019-07-08 11:26 ` [PATCH v1 12/12] sql: use schema's func hash instead of FuncDef hash Kirill Shcherbatov
2019-07-08 11:26 ` [PATCH v1 02/12] sql: get rid of SOUNDEX, MATCH Kirill Shcherbatov
2019-07-08 11:26 ` [PATCH v1 03/12] sql: get rid of LIKELY, UNLIKELY and LIKEHOOD Kirill Shcherbatov
2019-07-08 11:26 ` [PATCH v1 04/12] box: introduce Lua persistent functions Kirill Shcherbatov
2019-07-08 11:26 ` [PATCH v1 05/12] sql: put analyze helpers to FuncDef cache Kirill Shcherbatov
2019-07-09 15:56   ` [tarantool-patches] " n.pettik
2019-07-08 11:26 ` [PATCH v1 06/12] sql: rework LIKE case-insensitive mode Kirill Shcherbatov
2019-07-08 11:26 ` [PATCH v1 07/12] sql: replace bool is_derived_coll marker with flag Kirill Shcherbatov
2019-07-09 16:13   ` [tarantool-patches] " n.pettik
2019-07-08 11:26 ` [PATCH v1 08/12] sql: refactor builtins signatures with port Kirill Shcherbatov
2019-07-08 11:26 ` [PATCH v1 09/12] box: use own vtab per each function object Kirill Shcherbatov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1562584567.git.kshcherbatov@tarantool.org \
    --to=kshcherbatov@tarantool.org \
    --cc=korablev@tarantool.org \
    --cc=kostja@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --cc=vdavydov.dev@gmail.com \
    --subject='Re: [PATCH v1 00/12] sql: uniform SQL and Lua functions subsystem' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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