From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng3.m.smailru.net (smtpng3.m.smailru.net [94.100.177.149]) (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 8FB2E4696C3 for ; Tue, 11 Feb 2020 17:14:46 +0300 (MSK) Date: Tue, 11 Feb 2020 17:14:45 +0300 From: Nikita Pettik Message-ID: <20200211141445.GA8095@tarantool.org> References: <80556fbc35ddc9984b63bf2560a3c666ac114516.1580841722.git.korablev@tarantool.org> <4b6e4e38-ff15-fa1f-6c5b-862b6775d283@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <4b6e4e38-ff15-fa1f-6c5b-862b6775d283@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH 4/4] sql: do not force FP representation for NUMBER field List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladislav Shpilevoy Cc: tarantool-patches@dev.tarantool.org On 11 Feb 00:24, Vladislav Shpilevoy wrote: > Thanks for the patch, Mergen too! > > > diff --git a/test/sql-tap/numcast.test.lua b/test/sql-tap/numcast.test.lua > > index 87c5f6b35..f795cef75 100755 > > --- a/test/sql-tap/numcast.test.lua > > +++ b/test/sql-tap/numcast.test.lua > > @@ -191,4 +191,64 @@ test:do_execsql_test( > > 10, 10 > > }) > > > > +test:do_execsql_test( > > + "numcast-3.6", > > + [[ > > + CREATE TABLE t1 (id INT PRIMARY KEY, n NUMBER); > > + INSERT INTO t1 VALUES (1, 9223372036854775807); > > + INSERT INTO t1 VALUES (2, -9223372036854775807); > > + INSERT INTO t1 VALUES (3, 9223372036854775807.1); > > + SELECT n, n/100 FROM t1; > > + ]], { > > + 9223372036854775807ULL, 92233720368547758ULL, > > + -9223372036854775807LL, -92233720368547758LL, > > + 9223372036854775808, 92233720368547758.08 > > Could you please select smaller values for the test, in > case the big values don't matter here? Because > 9223372036854775807.1 turned into 9223372036854775808 looks > confusing. Ok: diff --git a/test/sql-tap/numcast.test.lua b/test/sql-tap/numcast.test.lua index f795cef75..eeac5353a 100755 --- a/test/sql-tap/numcast.test.lua +++ b/test/sql-tap/numcast.test.lua @@ -197,12 +197,12 @@ test:do_execsql_test( CREATE TABLE t1 (id INT PRIMARY KEY, n NUMBER); INSERT INTO t1 VALUES (1, 9223372036854775807); INSERT INTO t1 VALUES (2, -9223372036854775807); - INSERT INTO t1 VALUES (3, 9223372036854775807.1); + INSERT INTO t1 VALUES (3, 9007199254740992.0); SELECT n, n/100 FROM t1; ]], { 9223372036854775807ULL, 92233720368547758ULL, -9223372036854775807LL, -92233720368547758LL, - 9223372036854775808, 92233720368547758.08 + 9007199254740992, 90071992547409.92 })