[tarantool-patches] Re: [PATCH 2/3] sql: SELECT from system spaces returns unpacked msgpack.
n.pettik
korablev at tarantool.org
Mon Nov 19 20:27:39 MSK 2018
Please, don’t state problem in commit message. Instead, it would be
better to indicate fix of the problem. I would call it like:
sql: decode mgspack after SELECT from system spaces
Otherwise it looks like you are introducing new bug :)
Also, your patch affects not only system spaces.
For example:
box.schema.space.create('t’)
box.space.t:format({{name = 'id', type = 'integer'}, {name = 'x', type = 'any'}})
box.space.t:create_index('i1', {parts = {1, 'int'}})
box.space.t:insert({1, {1,2,3}})
box.space.t:insert({2, {a = 3}})
Before your patch:
tarantool> cn:execute('select * from \"t\"')
---
- metadata:
- name: id
type: UNKNOWN
- name: x
type: UNKNOWN
rows:
- [1, !!binary kwECAw==]
- [2, !!binary gaFhAw==]
...
After:
tarantool> cn:execute('select * from \"t\"')
---
- metadata:
- name: id
type: UNKNOWN
- name: x
type: UNKNOWN
rows:
- [1, [1, 2, 3]]
- [2, {'a': 3}]
…
I guess more precise to say sort of:
sql: decode ARRAY and MAP types after SELECT
Patch itself is OK, but I would rework test in order to avoid
using system spaces. It is up to you.
More information about the Tarantool-patches
mailing list