From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 6FA8125DF6 for ; Thu, 15 Aug 2019 17:14:06 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Tq3Ov-ezUgpZ for ; Thu, 15 Aug 2019 17:14:06 -0400 (EDT) Received: from smtp52.i.mail.ru (smtp52.i.mail.ru [94.100.177.112]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id C33512468A for ; Thu, 15 Aug 2019 17:14:05 -0400 (EDT) Subject: [tarantool-patches] Re: [PATCH v1 1/1] sql: improve vdbe_field_ref fetcher References: <978c68684414e4df06fa7b37697c3f348d96cf5b.1563781318.git.kshcherbatov@tarantool.org> <967599c4-0e10-8cdc-2860-dc02105cd341@tarantool.org> <9a02e44d-cdf8-c2e6-16b9-326aef714021@tarantool.org> <4151ee6c-fb07-0801-e6ad-d62cffcdb197@tarantool.org> <2683f8ca-9fe0-a0e6-7433-9bfa4745f4f4@tarantool.org> From: Vladislav Shpilevoy Message-ID: <09af6c7e-1a6f-4736-5f34-3f65b2266d45@tarantool.org> Date: Thu, 15 Aug 2019 23:16:49 +0200 MIME-Version: 1.0 In-Reply-To: <2683f8ca-9fe0-a0e6-7433-9bfa4745f4f4@tarantool.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-Help: List-Unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-Subscribe: List-Owner: List-post: List-Archive: To: Kirill Shcherbatov , Tarantool MailList Hi! Thanks for the fixes. See 2 comments below. > diff --git a/test/sql/misc.test.lua b/test/sql/misc.test.lua > index fdc19f3ac..afbb2d7f8 100644 > --- a/test/sql/misc.test.lua > +++ b/test/sql/misc.test.lua > @@ -35,3 +35,25 @@ s = box.schema.space.create('s',{format=format, temporary=true}) > i = s:create_index('i') > box.execute('select * from "s"') > s:drop() > + > +-- > +-- gh-4267: Full power of vdbe_field_ref > +-- The test consists of sequential reads of multiple fields: > +-- the first is indexed while the other are not indexed. > +-- In skope of this issue an optimization that makes second and 1. 'scope'. > +-- third lookups faster were introduced. Test that they works > +-- correctly. 2. This is not an explanation, but rather a bit of water. With the same explanation you could test fields 1 and 2. Please, explain why exactly these numbers. Also you somewhy dropped the previous test on the border case about a field < 64 and >= 64 in one request. Why? The test below does not cover it. > +-- > +format = {} > +t = {} > +test_run:cmd("setopt delimiter ';'") > +for i = 1, 70 do > + format[i] = {name = 'FIELD'..i, type = 'unsigned'} > + t[i] = i > +end > +test_run:cmd("setopt delimiter ''"); For such a small piece of code you could use '\' instead of setopt delimiter. IMO \ looks much better. Up to you. > +s = box.schema.create_space('TEST', {format = format}) > +pk = s:create_index('pk', {parts = {66}}) > +s:insert(t) > +box.execute('SELECT field66, field68, field70 FROM test') > +box.space.TEST:drop() >