[Tarantool-patches] [PATCH v1 2/2] sql: always show value in type mismatch error

Mergen Imeev imeevma at tarantool.org
Fri Jun 25 13:46:19 MSK 2021


Hi! Thank you for your suggestions. My answers below.

On Fri, Jun 25, 2021 at 01:17:10PM +0300, Timur Safin wrote:
> : From: Kirill Yukhin via Tarantool-patches
> : Subject: Re: [Tarantool-patches] [PATCH v1 2/2] sql: always show value in
> : type mismatch error
> : 
> : Hello,
> : 
> : On 24 Jun 13:30, Mergen Imeev via Tarantool-patches wrote:
> : > diff --git a/src/box/sql/vdbe.c b/src/box/sql/vdbe.c
> : >  -- Check interaction of BOOLEAN and TEXT.
> : > @@ -5272,124 +5272,124 @@ SELECT a2, d, d OR a2 FROM t6, t9;
> : >  SELECT true > 'abc';
> : >   | ---
> : >   | - null
> : > - | - 'Type mismatch: can not convert text to boolean'
> : > + | - 'Type mismatch: can not convert abc to boolean'
> : 
> : Is it possible to quote string values (like you do for varbinary)?
Yes, it is possible. I will make a patch.

> : 
> : --
> : Regards, Kirill Yukhin
> 
> Yep, agree with Kirill here - it would be more 
> distinguishable if textual literals (or UUID)
> would be properly quoted. 
> 
> Also, I assume that reporting original type was useful
> as well. So, if possible, it would be ideally if both 
> values and their types would be reported, e.g.
> 
> > @@ -5272,124 +5272,124 @@ SELECT a2, d, d OR a2 FROM t6, t9;
> >  SELECT true > 'abc';
> >   | ---
> >   | - null
> > - | - 'Type mismatch: can not convert text to boolean'
> > + | - 'Type mismatch: can not convert text ("abc") to boolean'
> 
> 
> Best Regards,
> Timur
> 
Ok. However, since this patch-set is now too large for an already closed issue,
I will make a new issue. In this issue, I will describe what changes I plan to
make.

Also, Timur please do not remove tarantool-patches at dev.tarantool.org from your
answers.



More information about the Tarantool-patches mailing list