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 1D0CF6EC58; Wed, 4 Aug 2021 17:08:45 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 1D0CF6EC58 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1628086125; bh=RyOnDHegXUBb1Ql1OLTcp6kWJbt/NbI8QqeJ5frPEzI=; 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=av6+8QNMYOQuiRcRENyElDCvpzEnYqK01kqvohUzQ8U+94n0agioWw5jVaagyyAG5 eHuy8tXLVBgU2knoCLd+oQeh494ruvUrZZe6YI8yahJSg/ACwr+ufYgkjzPp4laoNs fILIJ/9wmskzmW0PXPGxdeHf34/QbMFMHbG75YPs= Received: from smtp41.i.mail.ru (smtp41.i.mail.ru [94.100.177.101]) (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 4FCA86EC58 for ; Wed, 4 Aug 2021 17:08:44 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 4FCA86EC58 Received: by smtp41.i.mail.ru with esmtpa (envelope-from ) id 1mBHZb-0001B4-MG; Wed, 04 Aug 2021 17:08:44 +0300 Date: Wed, 4 Aug 2021 14:08:43 +0000 To: imeevma@tarantool.org Cc: tarantool-patches@dev.tarantool.org Message-ID: <20210804140843.ehxiug24qvglf3ci@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: 4F1203BC0FB41BD941C43E597735A9C3104FC76DFAAAAF7DA068FE323FAC4379182A05F538085040AE293D7299A509BBCD2DCB753BA6C8A86DDFCF7DDBE738B03D00F721FB033661 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE78CB87876C5D626D4EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063795DC1BB912715AE68638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8B9CEDA879E86FFC67B0B16F8C809D01D117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC2EE5AD8F952D28FBA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD182CC0D3CB04F14752D2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EEC65AC60A1F0286FE07FB45A5F6E725C8D8FC6C240DEA7642DBF02ECDB25306B2B78CF848AE20165D0A6AB1C7CE11FEE31E44367C8E80A7B4AD7EC71F1DB88427C4224003CC836476EA7A3FFF5B025636E2021AF6380DFAD1A18204E546F3947CB11811A4A51E3B096D1867E19FE1407959CC434672EE6371089D37D7C0E48F6C8AA50765F79006377870F476E0DB9443EFF80C71ABB335746BA297DBC24807EABDAD6C7F3747799A X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A213B5FB47DCBC3458834459D11680B5058285B33B0D6DF4F250BEC3A9A69F317F X-C1DE0DAB: 0D63561A33F958A5D021191C27884F8714772FE6EDA034E33FB78B49F1826742D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7501A9DF589746230F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34682FD2D2951524C5EE9AE84D6E17C4AE5861629C3A2BDB3DA65830A33DB9E6232BD00FCC5767BBEE1D7E09C32AA3244C04FB3D53484D9D9379BACD1AB776FF2330363D8B7DA7DD44729B2BEF169E0186 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojeDyvyeZJDJG5nKwbiOKGhQ== X-Mailru-Sender: 05EB39F83D09414F9B5D7F52D7CDFDD2A77E9618E2F5860C122B2CAE5D220FDE086539DC6DDBA5DCCA16B95394F0DD5CE99530A0C0F27B5268329DCED823713783C0E760C018FF54112434F685709FCF0DA7A0AF5A3A8387 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 The patch LGTM. -- Regards, Kirill Yukhin