From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 1F0366EC5F; Thu, 5 Aug 2021 12:38:27 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 1F0366EC5F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1628156307; bh=81gYl+PB83F27+UtEHB1Ftb23DZ0A3GOxUNi8zE4Kwo=; h=Date:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=iqBJezwaLUuv1e0h9a9MAdKpBG7V6iMwdzG/rRS7uTkTzOnJxKb+PEckoURwazqgU rykGHvwK/JP5zl7woaVUWSQLx3sNaZztgbAm9DP0PAIYQDXKDnPfTkVSKE05svyIMr Y72TsT79mnCH4eDYR23IwPJmjinvAoq6JKzjVosI= Received: from smtp32.i.mail.ru (smtp32.i.mail.ru [94.100.177.92]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id BCABE6EC5F for ; Thu, 5 Aug 2021 12:38:26 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org BCABE6EC5F Received: by smtp32.i.mail.ru with esmtpa (envelope-from ) id 1mBZpa-0001b3-31; Thu, 05 Aug 2021 12:38:26 +0300 Date: Thu, 5 Aug 2021 09:38:25 +0000 To: imeevma@tarantool.org Cc: tarantool-patches@dev.tarantool.org Message-ID: <20210805093825.ndx5aef5ognyytmc@tarantool.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD941C43E597735A9C366EE405EC28A2001F8302D8429E0DE58182A05F538085040288D5CC5FB40FE18893B1C4E9B00637C4F57F7597620BD992E79CE439BE3F712 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE78CB87876C5D626D4EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006379C6BD13E0D9523298638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8D2160AB8B65FE64BCD271A5ED002A704117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC2EE5AD8F952D28FBA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD18CB629EEF1311BF91D2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EED76C6ED7039589DED94E105876FE7799D8FC6C240DEA7642DBF02ECDB25306B2B78CF848AE20165D0A6AB1C7CE11FEE3A6C7FFFE744CA7FB03F1AB874ED89028C4224003CC836476EA7A3FFF5B025636E2021AF6380DFAD1A18204E546F3947CB11811A4A51E3B096D1867E19FE1407959CC434672EE6371089D37D7C0E48F6C8AA50765F7900637C970FD8DF19C51D2EFF80C71ABB335746BA297DBC24807EABDAD6C7F3747799A X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A213B5FB47DCBC3458834459D11680B505CE4D8913438DE0E5B4947A2BF00AD9A3 X-C1DE0DAB: 0D63561A33F958A5D4AD885DA2383B00B5D0199815D617FE35F79FD102AFAA24D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7501A9DF589746230F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D348B409C2D257583DFE10BE3CD9565D4AD1F9A01B8B48CC1F2AB89EF0F71B2855416D0DCDB39F13A6A1D7E09C32AA3244CD37B090B930877D852F4744668CF250E33C9DC155518937F729B2BEF169E0186 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojh4v93/7HD3VT6e2Vk5OJrQ== X-Mailru-Sender: 05EB39F83D09414F9B5D7F52D7CDFDD2F5BA0522448137B7989E170485750FDF01FBC7AEF2D7CFB5CA16B95394F0DD5CE99530A0C0F27B5268329DCED823713783C0E760C018FF54112434F685709FCF0DA7A0AF5A3A8387 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v1 1/1] sql: remove OP_Realify X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Kirill Yukhin via Tarantool-patches Reply-To: Kirill Yukhin Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" 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 I've checked your patch into 2.7, 2.8 and master. -- Regards, Kirill Yukhin