[Tarantool-patches] [PATCH v2 1/1] sql: make NUMBER to be union of SQL numeric types

Alexander Turenko alexander.turenko at tarantool.org
Mon Feb 10 00:29:32 MSK 2020


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.


More information about the Tarantool-patches mailing list