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 7E73D6EC55; Tue, 7 Sep 2021 15:05:42 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 7E73D6EC55 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1631016342; bh=ofnH1F6ngnTuu6E/1tX3V/RimZ+wJjwWMdxxMS5+gaw=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=WbfVX/2JMrJ+CRMgcf6rLe+HPfMwZEByLAWtFqcr8EQy8vpGYfZu2uigj5cHXO77L Zb6slTq7i8cK7YRpdYsQUsZAcHItgjmU2UMWSPrcY/Cty7UMQAMd281HEzM96JZ7Dt +Wk8oTeqeDbqreRB0cb/IXcZLwWVgidwVnx4abX0= Received: from smtpng2.i.mail.ru (smtpng2.i.mail.ru [94.100.179.3]) (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 655B26EC55 for ; Tue, 7 Sep 2021 15:05:41 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 655B26EC55 Received: by smtpng2.m.smailru.net with esmtpa (envelope-from ) id 1mNZrA-0003KG-7W; Tue, 07 Sep 2021 15:05:40 +0300 Date: Tue, 7 Sep 2021 14:40:25 +0300 To: imeevma@tarantool.org Message-ID: <20210907114025.GX5743@tarantool.org> References: <6229320676324201d74e78ac1f2832b79fd159cb.1630303937.git.imeevma@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <6229320676324201d74e78ac1f2832b79fd159cb.1630303937.git.imeevma@gmail.com> X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.10.1 (2018-07-13) X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9D96C1EA41D18F4D5B168DC3F7DB30EB4BE25CD3FBE4D8277182A05F5380850408913A44AAE175EC1D1F028FC82339AE4A9B8738C83FF1E6B87F1AB0201ADC80D X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7A4C4638C9DDF45FCEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006372B7E36617B0C54A78638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D84756C26B92F14684A66AB21F546DB952117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC2EE5AD8F952D28FBA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD18C26CFBAC0749D213D2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B682BBBAF5DF00056E089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-C1DE0DAB: 0D63561A33F958A54454EC929E1A8F18577E6132E45F50ED684338353361CD26D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA752546FE575EB473F1410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34197948450CB5442A00BC0D74826E6AF7780D6337523EA23F83F2D9E1D312566CCFFAA7386DB8E5141D7E09C32AA3244C2AF8FA3068680FA76CC2047370F025ABE646F07CC2D4F3D8FACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojSvkey75OmIoViQYfKr+Asg== X-Mailru-Sender: 689FA8AB762F7393C37E3C1AEC41BA5D10A11991BB599C7EDE7CB8339548139BA7C8D0F45F857DBFE9F1EFEE2F478337FB559BB5D741EB964C8C2C849690F8E70A04DAD6CC59E33667EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v1 1/1] sql: fix comparison between DECIMAL and big DOUBLE 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: Igor Munkin via Tarantool-patches Reply-To: Igor Munkin Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Mergen, Thanks for the patch! LGTM, with a few nits regarding the commit message. On 30.08.21, Mergen Imeev via Tarantool-patches wrote: > This patch fixes comparison between DECIMAL value and DOUBLE values > greater or equal to 1e38 or less or equal to -1e38. Now any DOUBLE value > greater or equal to 1e38 is more than any DECIMAL value and DOUBLE > value less or equal to -1e38 is less than any DECIMAL value. Minor: Considering Vlad's review[1], I would explicitly mention the order of the operands to be compared (DECIMAL is the left one, DOUBLE is the right one). The opposite case works fine even prior to the patch. Minor: It would be clearer, if you mention here that there are only 38 decimal digits in DECIMAL representation (hence, 1e38). > > Closes #6376 > --- > https://github.com/tarantool/tarantool/issues/6376 > https://github.com/tarantool/tarantool/tree/imeevma/gh-6376-fix-cmp-between-big-double-and-dec > > .../gh-6376-fix-incorrect-dec-inf-cmp.md | 3 ++ > src/box/sql/mem.c | 4 +- > test/sql-tap/engine.cfg | 1 + > .../gh-6376-wrong-double-to-dec-cmp.test.lua | 38 +++++++++++++++++++ > 4 files changed, 44 insertions(+), 2 deletions(-) > create mode 100644 changelogs/unreleased/gh-6376-fix-incorrect-dec-inf-cmp.md > create mode 100755 test/sql-tap/gh-6376-wrong-double-to-dec-cmp.test.lua > > -- > 2.25.1 > [1]: https://lists.tarantool.org/tarantool-patches/003f11f0-5ecc-2e69-dc89-47a34b5f24ac@tarantool.org/ -- Best regards, IM