Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladislav Shpilevoy via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: imeevma@tarantool.org
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH v1 03/13] sql: move collation to struct sql_context
Date: Tue, 14 Sep 2021 23:22:39 +0200	[thread overview]
Message-ID: <d01b3e1c-73ca-bb96-7883-1374db5d1c93@tarantool.org> (raw)
In-Reply-To: <610b38cc1f01a80faf25a194d157cc3987f28f83.1631289462.git.imeevma@gmail.com>

Thanks for working on this!

On 10.09.2021 18:01, imeevma@tarantool.org wrote:
> This patch makes it easier to get a collation by a function.

You could also store the opcode pointer instead of iOp. But I
suspect your main reason is to get rid of the vdbe pointer? If
yes, then why?

> diff --git a/src/box/sql/vdbe.c b/src/box/sql/vdbe.c
> index 2ff7ce8f4..12dc9126b 100644
> --- a/src/box/sql/vdbe.c
> +++ b/src/box/sql/vdbe.c
> @@ -1159,23 +1159,13 @@ case OP_Remainder: {           /* same as TK_REM, in1, in2, out3 */
>  	break;
>  }
>  
> -/* Opcode: CollSeq P1 * * P4
> - *
> - * P4 is a pointer to a CollSeq struct. If the next call to a user function
> - * or aggregate calls sqlGetFuncCollSeq(), this collation sequence will
> - * be returned. This is used by the built-in min(), max() and nullif()
> - * functions.
> +/* Opcode: SkipLoad P1 * * * *
>   *
>   * If P1 is not zero, then it is a register that a subsequent min() or
>   * max() aggregate will set to true if the current row is not the minimum or
>   * maximum.  The P1 register is initialized to false by this instruction.
> - *
> - * The interface used by the implementation of the aforementioned functions
> - * to retrieve the collation sequence set by this opcode is not available
> - * publicly.  Only built-in functions have access to this feature.
>   */
> -case OP_CollSeq: {
> -	assert(pOp->p4type==P4_COLLSEQ || pOp->p4.pColl == NULL);
> +case OP_SkipLoad: {

That is a very strange name. Couldn't OP_Bool somehow be reused?
Why is this R[p1] = false even needed?

>  	if (pOp->p1) {
>  		mem_set_bool(&aMem[pOp->p1], false);
>  	}

  reply	other threads:[~2021-09-14 21:22 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-10 16:01 [Tarantool-patches] [PATCH v1 00/13] sql: reworks aggregate functions Mergen Imeev via Tarantool-patches
2021-09-10 16:01 ` [Tarantool-patches] [PATCH v1 01/13] sql: use register P1 for number of arguments Mergen Imeev via Tarantool-patches
2021-09-10 16:01 ` [Tarantool-patches] [PATCH v1 02/13] sql: remove AggStep0 and OP_BuiltinFunction0 Mergen Imeev via Tarantool-patches
2021-09-10 16:27   ` Mergen Imeev via Tarantool-patches
2021-09-14 21:21   ` Vladislav Shpilevoy via Tarantool-patches
2021-09-10 16:01 ` [Tarantool-patches] [PATCH v1 03/13] sql: move collation to struct sql_context Mergen Imeev via Tarantool-patches
2021-09-14 21:22   ` Vladislav Shpilevoy via Tarantool-patches [this message]
2021-09-21 10:40     ` Mergen Imeev via Tarantool-patches
2021-09-10 16:02 ` [Tarantool-patches] [PATCH v1 04/13] sql: introduce mem_append() Mergen Imeev via Tarantool-patches
2021-09-10 16:02 ` [Tarantool-patches] [PATCH v1 05/13] sql: remove sql_vdbemem_finalize() Mergen Imeev via Tarantool-patches
2021-09-14 21:23   ` Vladislav Shpilevoy via Tarantool-patches
2021-09-21 10:47     ` Mergen Imeev via Tarantool-patches
2021-09-22 22:47       ` Vladislav Shpilevoy via Tarantool-patches
2021-09-10 16:02 ` [Tarantool-patches] [PATCH v1 06/13] sql: rework SUM() Mergen Imeev via Tarantool-patches
2021-09-10 16:02 ` [Tarantool-patches] [PATCH v1 07/13] sql: rework TOTAL() Mergen Imeev via Tarantool-patches
2021-09-10 16:02 ` [Tarantool-patches] [PATCH v1 08/13] sql: rework AVG() Mergen Imeev via Tarantool-patches
2021-09-14 21:24   ` Vladislav Shpilevoy via Tarantool-patches
2021-09-10 16:02 ` [Tarantool-patches] [PATCH v1 09/13] sql: rework COUNT() Mergen Imeev via Tarantool-patches
2021-09-10 16:02 ` [Tarantool-patches] [PATCH v1 10/13] sql: rework MIN() and MAX() Mergen Imeev via Tarantool-patches
2021-09-10 16:02 ` [Tarantool-patches] [PATCH v1 11/13] sql: rework GROUP_CONCAT() Mergen Imeev via Tarantool-patches
2021-09-10 16:02 ` [Tarantool-patches] [PATCH v1 12/13] sql: remove copying of result in finalizers Mergen Imeev via Tarantool-patches
2021-09-14 21:24   ` Vladislav Shpilevoy via Tarantool-patches
2021-09-21 10:49     ` Mergen Imeev via Tarantool-patches
2021-09-10 16:02 ` [Tarantool-patches] [PATCH v1 13/13] sql: remove MEM_TYPE_AGG 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=d01b3e1c-73ca-bb96-7883-1374db5d1c93@tarantool.org \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=imeevma@tarantool.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH v1 03/13] sql: move collation to struct sql_context' \
    /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