From: Vitaliia Ioffe via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH v1 1/1] sql: remove OP_Realify
Date: Wed, 04 Aug 2021 19:11:55 +0300 [thread overview]
Message-ID: <1628093515.981987788@f482.i.mail.ru> (raw)
In-Reply-To: <20210804140843.ehxiug24qvglf3ci@tarantool.org>
[-- Attachment #1: Type: text/plain, Size: 1712 bytes --]
Hi team,
QA LGTM
--
Vitaliia Ioffe
>Среда, 4 августа 2021, 17:08 +03:00 от Kirill Yukhin via Tarantool-patches <tarantool-patches@dev.tarantool.org>:
>
>Hello,
>
>On 04 авг 11:30, imeevma@tarantool.org wrote:
>> This opcode was used to convert INTEGER values to REAL. It is not
>> necessary in Tarantool and causes errors.
>>
>> Due to OP_Realify two type of errors appeared:
>> 1) In some cases in trigger INTEGER may be converted to DOUBLE.
>> For example:
>> box.execute("CREATE TABLE t (i NUMBER PRIMARY KEY, n NUMBER);")
>> box.execute("CREATE TRIGGER t AFTER INSERT ON t FOR EACH ROW BEGIN UPDATE t SET n = new.n; END;")
>> box.execute("INSERT INTO t VALUES (1, 1);")
>> box.execute("SELECT i / 2, n / 2 FROM t;")
>>
>> Result:
>> tarantool> box.execute("SELECT i / 2, n / 2 FROM t;")
>> ---
>> - metadata:
>> - name: COLUMN_1
>> type: number
>> - name: COLUMN_2
>> type: number
>> rows:
>> - [0, 0.5]
>> ...
>>
>> 2) If SELECT uses GROUP BY then it may return DOUBLE instead of INTEGER.
>> For example:
>> box.execute("CREATE TABLE t (i NUMBER PRIMARY KEY, n NUMBER);")
>> box.execute("INSERT INTO t VALUES (1,1);")
>> box.execute("SELECT i / 2, n / 2 FROM t GROUP BY n;")
>>
>> Result:
>> tarantool> box.execute("SELECT i / 2, n / 2 FROM t GROUP BY n;")
>> ---
>> - metadata:
>> - name: COLUMN_1
>> type: number
>> - name: COLUMN_2
>> type: number
>> rows:
>> - [0.5, 0.5]
>> ...
>>
>> This patch removes OP_Realify, after which these errors disappear.
>>
>> Closes #5335
>> ---
>> https://github.com/tarantool/tarantool/issues/5335
>> https://github.com/tarantool/tarantool/tree/imeevma/gh-5335-remove-op-realify
>The patch LGTM.
>
>--
>Regards, Kirill Yukhin
[-- Attachment #2: Type: text/html, Size: 2695 bytes --]
next prev parent reply other threads:[~2021-08-04 16:11 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-04 8:30 Mergen Imeev via Tarantool-patches
2021-08-04 14:08 ` Kirill Yukhin via Tarantool-patches
2021-08-04 16:11 ` Vitaliia Ioffe via Tarantool-patches [this message]
2021-08-05 9:38 ` Kirill Yukhin via Tarantool-patches
-- strict thread matches above, loose matches on Subject: below --
2021-08-02 18:09 Mergen Imeev via Tarantool-patches
2021-07-30 7:25 Mergen Imeev via Tarantool-patches
2021-07-29 6:48 Mergen Imeev via Tarantool-patches
2021-07-30 7:14 ` Timur Safin via Tarantool-patches
2021-07-30 7:18 ` Mergen Imeev via Tarantool-patches
2021-07-23 7:54 Mergen Imeev via Tarantool-patches
2021-07-26 20:58 ` Vladislav Shpilevoy via Tarantool-patches
2021-07-27 8:53 ` Mergen Imeev via Tarantool-patches
2021-07-28 21:59 ` Vladislav Shpilevoy via Tarantool-patches
2020-09-26 14:15 imeevma
2020-09-28 15:55 ` Nikita Pettik
2020-09-28 16:41 ` Mergen Imeev
2020-09-26 10:46 imeevma
2020-09-26 13:05 ` Vladislav Shpilevoy
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=1628093515.981987788@f482.i.mail.ru \
--to=tarantool-patches@dev.tarantool.org \
--cc=v.ioffe@tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH v1 1/1] sql: remove OP_Realify' \
/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