From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp47.i.mail.ru (smtp47.i.mail.ru [94.100.177.107]) (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 CE395445320 for ; Fri, 10 Jul 2020 18:37:32 +0300 (MSK) References: <1594375434-743-1-git-send-email-alyapunov@tarantool.org> From: Oleg Babin Message-ID: <37453fed-c16b-5644-b9ff-31373c64ca18@tarantool.org> Date: Fri, 10 Jul 2020 18:37:25 +0300 MIME-Version: 1.0 In-Reply-To: <1594375434-743-1-git-send-email-alyapunov@tarantool.org> Content-Type: text/plain; charset="utf-8"; format="flowed" Content-Transfer-Encoding: 8bit Content-Language: en-GB Subject: Re: [Tarantool-patches] [PATCH] Formatted select in lua console List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Aleksandr Lyapunov , tarantool-patches@dev.tarantool.org Cc: alexander.turenko@tarantool.org Hi! Thanks for your patch! It's not a review, but I just tried to use it. Works fine for default yaml console. But seems it completely broken for lua output. ``` tarantool> box.space.test:fselect() --- - - ​+-----+-----+-----+-----+-----+   - ​|col1 |col2 |col3 |col4 |col5 |   - ​+-----+-----+-----+-----+-----+   - ​|  1  |     |     |     |     |   - ​|  2  |  3  |     |     |     |   - ​|  4  |  5  |null |null | 123 |   - ​+-----+-----+-----+-----+-----+ ... tarantool> \set output lua true; tarantool> box.space.test:fselect() {"\xe2\x80\x8b+-----+-----+-----+-----+-----+", "\xe2\x80\x8b|col1\xc2\xa0|col2\xc2\xa0|col3\xc2\xa0|col4\xc2\xa0|col5\xc2\xa0|", "\xe2\x80\x8b+-----+-----+-----+-----+-----+", "\xe2\x80\x8b|\xc2\xa0\xc2\xa01\xc2\xa0\xc2\xa0|\xc2\xa0\xc2\xa0\xc2\xa0\xc2\xa0\xc2\xa0|\xc2\xa0\xc2\xa0\xc2\xa0\xc2\xa0\xc2\xa0|\xc2\xa0\xc2\xa0\xc2\xa0\xc2\xa0\xc2\xa0|\xc2\xa0\xc2\xa0\xc2\xa0\xc2\xa0\xc2\xa0|", "\xe2\x80\x8b|\xc2\xa0\xc2\xa02\xc2\xa0\xc2\xa0|\xc2\xa0\xc2\xa03\xc2\xa0\xc2\xa0|\xc2\xa0\xc2\xa0\xc2\xa0\xc2\xa0\xc2\xa0|\xc2\xa0\xc2\xa0\xc2\xa0\xc2\xa0\xc2\xa0|\xc2\xa0\xc2\xa0\xc2\xa0\xc2\xa0\xc2\xa0|", "\xe2\x80\x8b|\xc2\xa0\xc2\xa04\xc2\xa0\xc2\xa0|\xc2\xa0\xc2\xa05\xc2\xa0\xc2\xa0|null\xc2\xa0|null\xc2\xa0|\xc2\xa0123\xc2\xa0|", "\xe2\x80\x8b+-----+-----+-----+-----+-----+"}; ``` May be we should throw an error for "lua output" case. On 10/07/2020 13:03, Aleksandr Lyapunov wrote: > Introduce space:fselect and index:fselect. > The example is better than explanation: > > tarantool> _user:fselect{} > --- > - - ​+-----+-----+-------------+------+--------------------------------------------+ > - ​| id  |owner|    name     | type |                    auth                    | > - ​+-----+-----+-------------+------+--------------------------------------------+ > - ​|  0  |  1  |   "guest"   |"user"|{"chap-sha1":"vhvewKp0tNyweZQ+cFKAlsyphfg="}| > - ​|  1  |  1  |   "admin"   |"user"|                     {}                     | > - ​|  2  |  1  |  "public"   |"role"|                     {}                     | > - ​|  3  |  1  |"replication"|"role"|                     {}                     | > - ​| 31  |  1  |   "super"   |"role"|                     {}                     | > - ​+-----+-----+-------------+------+--------------------------------------------+ > ... > > > Aleksandr Lyapunov (1): > Introduce fselect - formatted select > > src/box/lua/schema.lua | 105 ++++++++++++++++++++++++++++++++ > test/engine/select.result | 142 ++++++++++++++++++++++++++++++++++++++++++++ > test/engine/select.test.lua | 25 ++++++++ > 3 files changed, 272 insertions(+) >