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 8684E741EE; Fri, 6 Aug 2021 04:30:14 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 8684E741EE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1628213414; bh=ItExdIp16IkPVWdzRPBK1TeA/NYYBmjLwvS/s1UPbwQ=; h=To:References:Date:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=UqSWaZHKM4um2qnupovZTVAZ9Ps9vMG1RNwQ4ummPWmv4obwIjGsTMuTWJuXUt2kG u5eGf+9X8jwx1D3VzkxudlNd/tIMYtlxV/XsplJB75YklCFLugJvl/uZilbIGquXYf xIzNtd9H/4FoVjm+NavyTnNhaZx6psl1j+qmAQ3I= Received: from smtp55.i.mail.ru (smtp55.i.mail.ru [217.69.128.35]) (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 B4350741EE for ; Fri, 6 Aug 2021 04:30:13 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org B4350741EE Received: by smtp55.i.mail.ru with esmtpa (envelope-from ) id 1mBoge-00021i-Fv; Fri, 06 Aug 2021 04:30:12 +0300 To: Safin Timur , Vladislav Shpilevoy References: <449cb4c7-c738-ed07-8517-61b663ad9f79@tarantool.org> <0931c9db-bd8e-0687-2c96-73fac1aeff7e@tarantool.org> Message-ID: <331a5d04-d756-fac0-fa07-cac594fa7ed8@tarantool.org> Date: Fri, 6 Aug 2021 04:30:11 +0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <0931c9db-bd8e-0687-2c96-73fac1aeff7e@tarantool.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD92087353F0EC44DD94BB7C0677F3ED9D05EB08EAFC9298EA6182A05F5380850402758BA4BB351F039B01F758B39282EB10DBF2C2F422EC130F3A2EAA8571FD991 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE789805A6418246A1AEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637CF19945FAF91394A8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D875A7D889986B4E9C5A9751F348A15B03117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCAA867293B0326636D2E47CDBA5A96583BD4B6F7A4D31EC0BC014FD901B82EE079FA2833FD35BB23D27C277FBC8AE2E8BAA867293B0326636D2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EEC65AC60A1F0286FEFCB1554B277F7060D8FC6C240DEA7642DBF02ECDB25306B2B78CF848AE20165D0A6AB1C7CE11FEE39E541A154B51D14B040F9FF01DFDA4A8C4224003CC836476EA7A3FFF5B025636E2021AF6380DFAD1A18204E546F3947CB11811A4A51E3B096D1867E19FE1407959CC434672EE6371089D37D7C0E48F6C8AA50765F790063747074E5DE1517656EFF80C71ABB335746BA297DBC24807EABDAD6C7F3747799A X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A213B5FB47DCBC3458834459D11680B50517EDE4E6C178B23555D1A7C25BB41B3C X-C1DE0DAB: 0D63561A33F958A58B1B12A6F055EA1AD767BD7F4AAE2CF712FE46690AA9B8FED59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7501A9DF589746230F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34987A0E8D235BB53472D86D00EC19AB7FE941445C2CAAB9FC3F7D46E9D5C5483316975679E5481C5B1D7E09C32AA3244CABCC0736A6C2C6B81EBEECD138BF473460759606DA2E136A83B48618A63566E0 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojFhlvmGwdUwTWhFFs15TAhg== X-Mailru-Sender: 583F1D7ACE8F49BD1042885CEC987B6B1109A154697E879BB01F758B39282EB1CA71892AC981DD5F7019711D9D5B048E1458020726E2BC9FD5ECBA0B92C0A936CDC7563AA7CEBD287402F9BA4338D657ED14614B50AE0675 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v3 2/9] lua: built-in module datetime 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: Oleg Babin via Tarantool-patches Reply-To: Oleg Babin Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" On 06.08.2021 03:23, Safin Timur wrote: > > i.e. whenever we see not datetime or interva value datetime_cmp return > nil, and all comparisons always return false. Please give me know if > that's incorrect scenario and we should raise exception. This was the > way Oleg Bain has requested it to behave. (return false for bogus data) > Hi! Seems you understood me wrong. It was only about equal comparison. ``` tarantool> uuid.new() == newproxy() --- - false ... tarantool> uuid.new() > newproxy() --- - error: '[string "return require(''uuid'').new() > newproxy()"]:1: incorrect value     to convert to uuid as 1 argument' ... ``` However, currently I see that decimal have a bit different behaviour and raises always: ``` tarantool> decimal.new(1) == newproxy() --- - error: '[string "return decimal.new(1) == newproxy()"]:1: expected decimal, number     or string as 2 argument' ... tarantool> decimal.new(1) > newproxy() --- - error: '[string "return decimal.new(1) > newproxy()"]:1: expected decimal, number     or string as 1 argument' ... ``` IMO, the first case is better because we can check that two lua built-in types are equal but can't compare them. ``` tarantool> {} == 'string' --- - false ... tarantool> {} > 'string' --- - error: '[string "return {} > ''string''"]:1: attempt to compare string with table' ... ```