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 608D46EC55; Sat, 31 Jul 2021 12:31:32 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 608D46EC55 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1627723892; bh=Sa9m6nLSiK7fkMTR7Zcjd5aW+V2BayzwNjX6PDeyqxU=; h=To:Cc:References:In-Reply-To:Date:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=P0fY+Fp3jzIRufpvR1W+Cm6GBvzxWp2QqJfQzOM0v41e/IyRDxphcLQUkm1nncU2I es615fDPX+ayjMe9FkjUJmFJAblQgISvmV72meO45UKuqksZr7Vbu13ycWVeYdvXR2 WydQcap2EFhVUDfPdPUFdbKC7askpZ3GMTzQGxfs= Received: from smtp35.i.mail.ru (smtp35.i.mail.ru [94.100.177.95]) (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 CD2896EC55 for ; Sat, 31 Jul 2021 12:31:30 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org CD2896EC55 Received: by smtp35.i.mail.ru with esmtpa (envelope-from ) id 1m9lL7-0001aL-5b; Sat, 31 Jul 2021 12:31:30 +0300 To: "'Oleg Babin'" , Cc: References: <2939f293071df83ba612c431895adea49c9cb8de.1627468002.git.tsafin@tarantool.org> <1f485144-efa1-3b19-c283-380908f4975c@tarantool.org> <044f01d78590$dd7053b0$9850fb10$@tarantool.org> <4c5ec0cf-960e-1c30-5ed3-76925b7babf9@tarantool.org> In-Reply-To: <4c5ec0cf-960e-1c30-5ed3-76925b7babf9@tarantool.org> Date: Sat, 31 Jul 2021 12:31:27 +0300 Message-ID: <04af01d785ee$d742d130$85c87390$@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQNJI0ot4YBfKbZyj2tYNprdOv6c+gIIcmeUAav/7B0BhcQG/gH1x1IjqEAVAwA= Content-Language: ru X-4EC0790: 10 X-7564579A: EEAE043A70213CC8 X-77F55803: 4F1203BC0FB41BD941C43E597735A9C3FDAB68B812060C77E97CF8617D978122182A05F53808504054667C8BE3F9F4E789E62ADF5FB37C4A7167F9C7CD5EA33CDF7EC601A698B6C9 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7D6964C9E324ABA58EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637652CD06254D2F21C8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D807839F9653DF769D8DB06191879EAC7B117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCAE9A1BBD95851C5BA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD18F04B652EEC242312D2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EEB28585415E75ADA91C9461EB66F04EBFD8FC6C240DEA7642DBF02ECDB25306B2B78CF848AE20165D0A6AB1C7CE11FEE317119E5299B287EEAD7EC71F1DB88427C4224003CC836476EA7A3FFF5B025636E2021AF6380DFAD1A18204E546F3947CB11811A4A51E3B096D1867E19FE1407959CC434672EE6371089D37D7C0E48F6C8AA50765F7900637BBEA499411984DA1EFF80C71ABB335746BA297DBC24807EABDAD6C7F3747799A X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A213B5FB47DCBC3458834459D11680B5056D4BDCE33E588388D2CA6BEECCE05960 X-C1DE0DAB: 0D63561A33F958A5ED56591EDD1408B597B1BFBF119994D5E1E1DA1B2B008A72D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA751B940EDA0DFB0535410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34D8C933888226C8419BB09BA98713B6B5768610F42A1B2A7A56CD478CC1D613BF3968912707A941AE1D7E09C32AA3244CAD7B228481ADE1C2494B0DFD61242F4C5A1673A01BA68E40FACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojNLQ8Cqcv1ivkUdD42uxSbA== X-Mailru-Sender: B5B6A6EBBD94DAD886B83A8C33386406B6C17C02A13DFCB4EE349F445D6D15E2A1103BDC899A26851EC9E4A2C82A33BC8C24925A86E657CE0C70AEE3C9A96FBAB3D7EE8ED63280BE112434F685709FCF0DA7A0AF5A3A8387 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH resend v2 06/11] box, datetime: datetime comparison for indices 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: Timur Safin via Tarantool-patches Reply-To: Timur Safin Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" : > : From: Oleg Babin : > : Subject: Re: [Tarantool-patches] [PATCH resend v2 06/11] box, datetime: : > : datetime comparison for indices : > : : > : Thanks for your patch. One question below. : > : : > : : > : Also update with arithmetic operations doesn't work. : > : : > : : > : ``` : > : : > : tarantool> box.space.dt:update({v}, {{'+', 2, 3}}) : > : --- : > : - error: 'Argument type in operation ''+'' on field 2 does not match : > : field type: expected : > : a number' : > : ... : > : : > : tarantool> box.space.dt:update({v}, {{'+', 2, dt.week(1)}}) : > : --- : > : - error: unsupported Lua type 'cdata' : > : ... : > : : > : ``` : > : > Oh, shit, I didn't take those operations into considerations. : > Do they work similarly with decimal? : : Looks like so. Moreover it seems we should support intervals as separate : type. : : Currently the single way to update is get + sum + put/update (with =). : : But I suppose native update will be needed anyway. At lest for SQL. : : Will be it able to perform some operations with intervals and timestamps? The original plan was to not persist intervals in the 1st iteration of implementation and store only full datetime values. Even for SQL I did not plan to allow schemas with interval as field type. INTERVALs in SQL expected to be present at run-time only at the Expressions, but then persisted as calculated datetime values. But, those box updates with intervals looks interesting, and we have to support, eventually. I don't know though whether it would require full interval support or the current partial will be enough? In any case - smells like we need to open ticket for that. Could you please do that with more details? Thanks, Timur