[Tarantool-patches] [PATCH v4 20/53] sql: introduce mem_bitwise()
Vladislav Shpilevoy
v.shpilevoy at tarantool.org
Tue Mar 30 02:03:18 MSK 2021
Thanks for the patch!
On 23.03.2021 10:35, Mergen Imeev via Tarantool-patches wrote:
> This patch introduces mem_bitwise(). Function mem_bitwise() executes
> bitwise operations with two operands and writes the result to the third
> MEM.
>
> Part of #5818
> ---
> src/box/sql/mem.c | 51 +++++++++++++++++++++++++++++++++++++++++++
> src/box/sql/mem.h | 3 +++
> src/box/sql/vdbe.c | 54 +++-------------------------------------------
> 3 files changed, 57 insertions(+), 51 deletions(-)
>
> diff --git a/src/box/sql/mem.c b/src/box/sql/mem.c
> index 8119644ed..2b455e39f 100644
> --- a/src/box/sql/mem.c
> +++ b/src/box/sql/mem.c
> @@ -556,6 +556,57 @@ mem_arithmetic(const struct Mem *left, const struct Mem *right,
> return 0;
> }
>
> +int
> +mem_bitwise(struct Mem *left, struct Mem *right, struct Mem *result, int op)
Would be better to split it into separate functions. Also why is OP_BitNot
separated? How is it much different from, say, OP_BitAnd?
Besides, having OP_BitNot in mem.c would allow to make sqlVdbeIntValue static
inside mem.c.
More information about the Tarantool-patches
mailing list