Tarantool development patches archive
 help / color / mirror / Atom feed
* [Tarantool-patches] [PATCH v2 00/15] sql: reworks aggregate functions
@ 2021-09-21 10:58 Mergen Imeev via Tarantool-patches
  2021-09-21 10:59 ` [Tarantool-patches] [PATCH v2 03/15] sql: remove AggStep0 and OP_BuiltinFunction0 Mergen Imeev via Tarantool-patches
  0 siblings, 1 reply; 4+ messages in thread
From: Mergen Imeev via Tarantool-patches @ 2021-09-21 10:58 UTC (permalink / raw)
  To: v.shpilevoy; +Cc: tarantool-patches

This patch-set reworks aggregate functions. After this patch-set they should
work according to new rules. Non-aggregate SQL built-in functions will be
reworked in another patch-set.

Also, this patch makes some refactoring of struct sql_context.

https://github.com/tarantool/tarantool/issues/4145
https://github.com/tarantool/tarantool/tree/imeevma/gh-4145-aggregate-functions

Changes in v2:
 - Added commit to remove possible UB in int-to-double implicit cast function.
 - Added commit to drop argv from struct sql_context.
 - Review fixes.

Mergen Imeev (15):
  sql: fix possible undefined behavior during cast
  sql: use register P1 for number of arguments
  sql: remove AggStep0 and OP_BuiltinFunction0
  sql: move collation to struct sql_context
  sql: introduce mem_append()
  sql: remove sql_vdbemem_finalize()
  sql: rework SUM()
  sql: rework TOTAL()
  sql: rework AVG()
  sql: rework COUNT()
  sql: rework MIN() and MAX()
  sql: rework GROUP_CONCAT()
  sql: remove copying of result in finalizers
  sql: remove MEM_TYPE_AGG
  sql: remove field argv from struct sql_context

 src/box/sql/date.c                       |  43 --
 src/box/sql/expr.c                       |  19 +-
 src/box/sql/func.c                       | 806 ++++++++++-------------
 src/box/sql/main.c                       |   5 +-
 src/box/sql/mem.c                        |  77 +--
 src/box/sql/mem.h                        |  29 +-
 src/box/sql/select.c                     |  29 +-
 src/box/sql/sqlInt.h                     |  23 +-
 src/box/sql/vdbe.c                       | 196 ++----
 src/box/sql/vdbeInt.h                    |   7 +-
 src/box/sql/vdbeapi.c                    |  66 --
 src/box/sql/vdbeaux.c                    |  13 +-
 test/sql-tap/built-in-functions.test.lua |  97 ++-
 13 files changed, 571 insertions(+), 839 deletions(-)

-- 
2.25.1


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

end of thread, other threads:[~2021-09-25 10:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-21 10:58 [Tarantool-patches] [PATCH v2 00/15] sql: reworks aggregate functions Mergen Imeev via Tarantool-patches
2021-09-21 10:59 ` [Tarantool-patches] [PATCH v2 03/15] sql: remove AggStep0 and OP_BuiltinFunction0 Mergen Imeev via Tarantool-patches
2021-09-22 22:46   ` Vladislav Shpilevoy via Tarantool-patches
2021-09-25 10:58     ` Mergen Imeev via Tarantool-patches

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