Tarantool development patches archive
 help / color / mirror / Atom feed
From: Mergen Imeev via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: v.shpilevoy@tarantool.org
Cc: tarantool-patches@dev.tarantool.org
Subject: [Tarantool-patches] [PATCH v2 00/15] sql: reworks aggregate functions
Date: Tue, 21 Sep 2021 13:58:58 +0300	[thread overview]
Message-ID: <cover.1632217202.git.imeevma@gmail.com> (raw)

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


             reply	other threads:[~2021-09-21 10:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-21 10:58 Mergen Imeev via Tarantool-patches [this message]
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

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.1632217202.git.imeevma@gmail.com \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=imeevma@tarantool.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH v2 00/15] sql: reworks aggregate functions' \
    /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