[tarantool-patches] [PATCH v3 0/9] sql: uniform SQL and Lua functions subsystem
Kirill Shcherbatov
kshcherbatov at tarantool.org
Fri Aug 16 16:26:46 MSK 2019
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.
Branch: http://github.com/tarantool/tarantool/tree/kshch/gh-4182-persistent-functions
Issue: https://github.com/tarantool/tarantool/issues/2233
Kirill Shcherbatov (9):
sql: remove SQL_PreferBuiltin flag
sql: GREATEST, LEAST instead of MIN/MAX overload
sql: wrap all trim functions in dispatcher
sql: rework SQL_FUNC_COUNT flag semantics
sql: rename OP_Function to OP_BuiltinFunction
sql: remove SQL_FUNC_SLOCHNG flag
sql: get rid of FuncDef function hash
sql: get rid of box.internal.sql_function_create
sql: better error messages on invalid arguments
src/box/lua/lua_sql.h | 39 --
src/box/port.h | 17 +
src/box/sql.h | 5 +
src/box/sql/sqlInt.h | 252 +++------
src/box/sql/vdbe.h | 11 +-
src/box/sql/vdbeInt.h | 26 +-
src/lib/core/port.h | 15 +
src/box/call.c | 1 +
src/box/execute.c | 1 +
src/box/func.c | 34 +-
src/box/lua/call.c | 6 +-
src/box/lua/lua_sql.c | 205 -------
src/box/port.c | 4 +
src/box/sql/analyze.c | 40 +-
src/box/sql/callback.c | 211 --------
src/box/sql/date.c | 28 -
src/box/sql/expr.c | 65 +--
src/box/sql/func.c | 933 ++++++++++++++++++++++++++------
src/box/sql/global.c | 7 -
src/box/sql/main.c | 137 -----
src/box/sql/resolve.c | 69 +--
src/box/sql/select.c | 12 +-
src/box/sql/vdbe.c | 95 +++-
src/box/sql/vdbeapi.c | 17 +-
src/box/sql/vdbeaux.c | 33 +-
src/box/sql/vdbemem.c | 67 +--
src/box/sql/whereexpr.c | 2 +-
src/box/CMakeLists.txt | 1 -
src/box/alter.cc | 6 +
src/box/bootstrap.snap | Bin 5907 -> 5934 bytes
src/box/lua/schema.lua | 3 +-
src/box/lua/upgrade.lua | 20 +
test-run | 2 +-
test/box-py/bootstrap.result | 4 +-
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 | 134 ++---
test/box/access_sysview.result | 8 +-
test/box/errinj.result | 5 +
test/box/errinj.test.lua | 3 +
test/box/function1.result | 183 ++++++-
test/box/function1.test.lua | 64 ++-
test/sql-tap/alias.test.lua | 11 +-
test/sql-tap/check.test.lua | 11 +-
test/sql-tap/coalesce.test.lua | 2 +-
test/sql-tap/func.test.lua | 22 +-
test/sql-tap/func2.test.lua | 18 +-
test/sql-tap/func3.test.lua | 12 +-
test/sql-tap/func5.test.lua | 61 ++-
test/sql-tap/in1.test.lua | 6 +-
test/sql-tap/insert1.test.lua | 2 +-
test/sql-tap/limit.test.lua | 4 +-
test/sql-tap/lua_sql.test.lua | 121 +++--
test/sql-tap/misc1.test.lua | 2 +-
test/sql-tap/select1.test.lua | 34 +-
test/sql-tap/select2.test.lua | 6 +-
test/sql-tap/select3.test.lua | 2 +-
test/sql-tap/subquery.test.lua | 21 +-
test/sql-tap/trigger9.test.lua | 8 +-
test/sql-tap/where2.test.lua | 4 +-
test/sql-tap/with1.test.lua | 2 +-
test/sql/errinj.result | 26 -
test/sql/errinj.test.lua | 10 -
test/sql/func-recreate.result | 41 +-
test/sql/func-recreate.test.lua | 26 +-
test/sql/icu-upper-lower.result | 4 +-
test/sql/iproto.result | 8 +-
test/sql/iproto.test.lua | 4 +-
test/sql/types.result | 12 +-
test/sql/types.test.lua | 6 +-
test/wal_off/func_max.result | 8 +-
73 files changed, 1763 insertions(+), 1504 deletions(-)
delete mode 100644 src/box/lua/lua_sql.h
delete mode 100644 src/box/lua/lua_sql.c
--
2.22.1
More information about the Tarantool-patches
mailing list