Tarantool development patches archive
 help / color / mirror / Atom feed
* [tarantool-patches] [PATCH v3 0/9] sql: uniform SQL and Lua functions subsystem
@ 2019-08-16 13:26 Kirill Shcherbatov
  2019-08-16 13:26 ` [tarantool-patches] [PATCH v3 1/9] sql: remove SQL_PreferBuiltin flag Kirill Shcherbatov
                   ` (8 more replies)
  0 siblings, 9 replies; 19+ messages in thread
From: Kirill Shcherbatov @ 2019-08-16 13:26 UTC (permalink / raw)
  To: tarantool-patches, korablev; +Cc: 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.

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

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

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

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-16 13:26 [tarantool-patches] [PATCH v3 0/9] sql: uniform SQL and Lua functions subsystem Kirill Shcherbatov
2019-08-16 13:26 ` [tarantool-patches] [PATCH v3 1/9] sql: remove SQL_PreferBuiltin flag Kirill Shcherbatov
2019-08-16 13:26 ` [tarantool-patches] [PATCH v3 2/9] sql: GREATEST, LEAST instead of MIN/MAX overload Kirill Shcherbatov
2019-08-16 18:57   ` [tarantool-patches] " n.pettik
2019-08-16 13:26 ` [tarantool-patches] [PATCH v3 3/9] sql: wrap all trim functions in dispatcher Kirill Shcherbatov
2019-08-16 13:26 ` [tarantool-patches] [PATCH v3 4/9] sql: rework SQL_FUNC_COUNT flag semantics Kirill Shcherbatov
2019-08-16 18:55   ` [tarantool-patches] " n.pettik
2019-08-16 13:26 ` [tarantool-patches] [PATCH v3 5/9] sql: rename OP_Function to OP_BuiltinFunction Kirill Shcherbatov
2019-08-16 13:26 ` [tarantool-patches] [PATCH v3 6/9] sql: remove SQL_FUNC_SLOCHNG flag Kirill Shcherbatov
2019-08-16 18:54   ` [tarantool-patches] " n.pettik
2019-08-16 13:26 ` [tarantool-patches] [PATCH v3 7/9] sql: get rid of FuncDef function hash Kirill Shcherbatov
2019-08-16 14:09   ` [tarantool-patches] " Konstantin Osipov
2019-08-16 18:59     ` n.pettik
2019-08-19 15:51     ` Kirill Shcherbatov
2019-08-20 13:47       ` Konstantin Osipov
2019-08-20 19:04       ` n.pettik
2019-08-20 19:12         ` Konstantin Osipov
2019-08-16 13:26 ` [tarantool-patches] [PATCH v3 8/9] sql: get rid of box.internal.sql_function_create Kirill Shcherbatov
2019-08-16 13:26 ` [tarantool-patches] [PATCH v3 9/9] sql: better error messages on invalid arguments Kirill Shcherbatov

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