From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp46.i.mail.ru (smtp46.i.mail.ru [94.100.177.106]) (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 2F29A46970E for ; Mon, 10 Feb 2020 00:29:19 +0300 (MSK) Date: Mon, 10 Feb 2020 00:29:32 +0300 From: Alexander Turenko Message-ID: <20200209212932.bwo7bzovelxcog2z@tkn_work_nb> References: <55e18164c96a568a757423df813dc4e73f45b1c9.1577782147.git.imeevma@gmail.com> <20191231085607.GB30188@tarantool.org> <20191231094611.GA9514@tarantool.org> <20200113125829.GB7851@tarantool.org> <20200117080636.GA23812@tarantool.org> <20200122132617.GA1144@tarantool.org> <20200123134040.GA18715@tarantool.org> <20200128162329.GA1049@tarantool.org> <20200203095210.GA7696@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200203095210.GA7696@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH v2 1/1] sql: make NUMBER to be union of SQL numeric types List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Mergen Imeev , Nikita Pettik Cc: tarantool-patches@dev.tarantool.org, v.shpilevoy@tarantool.org On Mon, Feb 03, 2020 at 12:52:10PM +0300, Mergen Imeev wrote: > On Tue, Jan 28, 2020 at 07:23:29PM +0300, Nikita Pettik wrote: > > On 23 Jan 16:40, Mergen Imeev wrote: > > > Hi! Thank you for review. My answers and new commit-message > > > below. > > > > Hi, > > > > I've a bit reworked your patch: splitted it into consistent sequence of > > independent patches and provided refactoring for sqlVdbeMemNumerify(). > > Also I found that CAST boolean AS NUMBER didn't work properly: cast resulted > > in error meanshile cast boolean as integer is legal, so that as number should > > be legal as well. There's no more functional changes except for mentioned one. > > Please look at branch: https://github.com/tarantool/tarantool/commits/np/gh-4233-fix-number-field-type-in-sql > > > > If it is OK to you please reply and I will push patches to master bracnch. > > Thanks. > > > Hi, > > I'm sorry, but I do not like it. Since now it is yours > commits, I'll ask Sasha to move issues #4233 and #4463 > to you. If you want a review, please ask Vlad. I guess Nikita expects that you'll agree with splitting of the commits and show you the code to save a time on a discussion. Since you disagreed (this fast path fails), I think Nikita should provide objections against your way explicitly. (However 'I do not like' is very weak argument, it is always better to provide some reasons explicitly.) 'CAST boolean AS NUMBER' does not look as part of tasks Mergen solving here (#4233 and #4463). Aside of this, the commit that fixes it is named as 'sql: refactor sqlVdbeMemNumerify()', but it changes a user visible behaviour and so it is not pure refactoring. It is also strange that it has no tests that will show how the behaviour is changed. Changes related to Tarantool/SQL type system are very opaque now in the sense that we have no formal type system description we want to implement as result. Just 'fix that' and 'change this'. I think we should design the type system first (we should did it a year ago) and only then make some changes. CCed Kirill and Sergos to plan this activity (or decide that the current way to design it is okay). WBR, Alexander Turenko.