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 A58A4223BF for ; Sat, 28 Apr 2018 02:56:55 -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 ijXctBlB-mGm for ; Sat, 28 Apr 2018 02:56:55 -0400 (EDT) Received: from smtpng1.m.smailru.net (smtpng1.m.smailru.net [94.100.181.251]) (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 677062239B for ; Sat, 28 Apr 2018 02:56:54 -0400 (EDT) Subject: [tarantool-patches] Re: [PATCH v2 2/2] Fixed lost format on update and upsert operations. References: <1f4e0a5e-30f2-f36a-3970-ec4eeb14a456@tarantool.org> <4a4c5106-1d2d-553f-c8f1-5c031e91c9ac@tarantool.org> <8a909d97-3f64-207d-fe25-a4462f814d38@tarantool.org> <0f5103aa-cbd6-8ccb-326d-51875e0f561d@tarantool.org> <42c7e5e1-2803-f3f7-6c7e-11c778399fd9@tarantool.org> <20180418122842.pkpq3mktqwjobppm@esperanza> <18a8749f-ba4e-61a8-a58d-12257f2d0f32@tarantool.org> From: Kirill Shcherbatov Message-ID: <0b6a2780-3eef-2da4-d68d-ff4c4870bf13@tarantool.org> Date: Sat, 28 Apr 2018 09:56:51 +0300 MIME-Version: 1.0 In-Reply-To: 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: tarantool-patches@freelists.org Cc: "v.shpilevoy@tarantool.org" > Please, describe why we need inlined update here. 'Vlad insisted' is not a reason. Unlike update and upsert, transform creates a new tuple with runtime format; Moreover, the function inlining allowed to make allocations in the region, what is preferable. > Vova means, that if tuple:transform would use non-default tuple format, > the tests will pass anyway. Please, add a test on transform, that would not > pass, if tuple uses non-default format. > This test will pass even if we would use non-default tuple format diff --git a/test/engine/update.result b/test/engine/update.result index b73037e..6ab4436 100644 --- a/test/engine/update.result +++ b/test/engine/update.result @@ -728,11 +728,7 @@ aa:update({{'=',2, 666}}) aa:transform(-1, 1) --- - [1, 'ssss', '3', '4', '5', '6'] -... -aa:transform(1, 6) --- -- ['7'] -... aa = nil --- ... diff --git a/test/engine/update.test.lua b/test/engine/update.test.lua index e2a2265..3ff7e62 100644 --- a/test/engine/update.test.lua +++ b/test/engine/update.test.lua @@ -112,7 +112,6 @@ aa.VAL aa:update({{'=',2, 666}}) -- test transform integrity aa:transform(-1, 1) -aa:transform(1, 6) aa = nil s:upsert({2, 'wwwww'}, {{'=', 2, 'wwwww'}})