[tarantool-patches] Re: [PATCH 5/6] sql: introduce extended range for INTEGER type

n.pettik korablev at tarantool.org
Wed Jul 24 19:54:01 MSK 2019



> On 24 Jul 2019, at 18:59, Konstantin Osipov <kostja at tarantool.org> wrote:
> 
> * Nikita Pettik <korablev at tarantool.org> [19/06/07 23:30]:
>> @@ -72,11 +72,11 @@ execute('SELECT ?, ?, ?', {1, 2, 3})
>> ---
>> - metadata:
>>   - name: '?'
>> -    type: INTEGER
>> +    type: UNSIGNED
>>   - name: '?'
>> -    type: INTEGER
>> +    type: UNSIGNED
>>   - name: '?'
>> -    type: INTEGER
>> +    type: UNSIGNED
>>   rows:
>>   - [1, 2, 3]
> 
> Nikita,
> 
> I know this decision came after you coded most of the patch, but
> we agreed that unsigned integer literals should still have
> "INTEGER" type, not "UNSIGNED", since INTEGER in tarantool fully
> covers UNSIGNED range.

Yep, I remember that and fixed that for literals:

tarantool> select 1
---
- metadata:
  - name: '1'
    type: integer
  rows:
  - [1]
…

But failed (simply forgot) to fix that for binding values.
So, juts want to clarify: we never set “UNSIGNED” type for
literals, even if they are in range [2^63, 2^64-1], right?

If so, patch turns out to be pretty simple.


> This leads to fewer surprises to users, e.g. when calculating
> expression types. Could you please fix this?
> 
> -- 
> Konstantin Osipov, Moscow, Russia
> 





More information about the Tarantool-patches mailing list