[Tarantool-patches] [PATCH v1 0/9] Check types of SQL built-in functions arguments

imeevma at tarantool.org imeevma at tarantool.org
Thu Aug 19 15:02:54 MSK 2021


This patch introduces static and dynamic type checks for SQL built-in functions.

https://github.com/tarantool/tarantool/issues/6105
https://github.com/tarantool/tarantool/tree/imeevma/gh-6105-properly-check-funcs-args-types

Mergen Imeev (9):
  sql: modify signature of TRIM()
  sql: rework SQL built-in functions hash table
  sql: check number of arguments during parsing
  sql: static type check for SQL built-in functions
  sql: runtime type check for SQL built-in functions
  sql: enable types checking for some functions
  sql: fix result type of min() and max() functions
  sql: check argument types of sum(), avg(), total()
  sql: arguments check for string value functions

 .../gh-6105-built-in-functions-args.md        |    6 +
 src/box/sql/expr.c                            |   36 +-
 src/box/sql/func.c                            | 1339 +++++++----------
 src/box/sql/mem.c                             |    2 +-
 src/box/sql/parse.y                           |   36 +-
 src/box/sql/prepare.c                         |    2 +-
 src/box/sql/resolve.c                         |   44 +-
 src/box/sql/select.c                          |   10 +-
 src/box/sql/sqlInt.h                          |   13 +
 test/sql-tap/aggnested.test.lua               |    8 +-
 test/sql-tap/badutf1.test.lua                 |   34 +-
 test/sql-tap/built-in-functions.test.lua      |  548 +++++++
 test/sql-tap/coalesce.test.lua                |    2 +-
 test/sql-tap/cse.test.lua                     |    8 +-
 test/sql-tap/distinctagg.test.lua             |    3 +-
 test/sql-tap/e_select1.test.lua               |   30 +-
 test/sql-tap/engine.cfg                       |    3 +
 test/sql-tap/func.test.lua                    |  213 +--
 test/sql-tap/func2.test.lua                   |   18 +-
 test/sql-tap/func5.test.lua                   |    6 +-
 .../gh-6299-lost-collation-on-trim.test.lua   |   47 +
 test/sql-tap/minmax2.test.lua                 |    5 +-
 test/sql-tap/minmax4.test.lua                 |    2 +-
 test/sql-tap/null.test.lua                    |    2 +-
 test/sql-tap/orderby1.test.lua                |    2 +-
 test/sql-tap/position.test.lua                |   84 +-
 test/sql-tap/select1.test.lua                 |    4 +-
 test/sql-tap/select3.test.lua                 |   16 +-
 test/sql-tap/select5.test.lua                 |    2 +-
 test/sql-tap/select6.test.lua                 |   21 +-
 test/sql-tap/selectG.test.lua                 |    2 +-
 test/sql-tap/sql-errors.test.lua              |    2 +-
 test/sql-tap/subquery.test.lua                |    8 +-
 test/sql-tap/substr.test.lua                  |    6 +-
 test/sql-tap/tkt2942.test.lua                 |   10 +-
 test/sql-tap/uuid.test.lua                    |   86 +-
 test/sql-tap/view.test.lua                    |    2 +-
 test/sql-tap/where3.test.lua                  |    6 +-
 test/sql-tap/with1.test.lua                   |    2 +-
 test/sql/boolean.result                       |   45 +-
 test/sql/collation.result                     |    2 +-
 test/sql/iproto.result                        |    4 +-
 test/sql/max-on-index.result                  |    6 +-
 test/sql/prepared.result                      |   12 +-
 test/sql/prepared.test.lua                    |    2 +-
 test/sql/types.result                         |  122 +-
 46 files changed, 1498 insertions(+), 1365 deletions(-)
 create mode 100644 changelogs/unreleased/gh-6105-built-in-functions-args.md
 create mode 100755 test/sql-tap/built-in-functions.test.lua
 create mode 100755 test/sql-tap/gh-6299-lost-collation-on-trim.test.lua

-- 
2.25.1



More information about the Tarantool-patches mailing list