From: Nikita Pettik <korablev@tarantool.org> To: imeevma@tarantool.org Cc: tarantool-patches@dev.tarantool.org, v.shpilevoy@tarantool.org Subject: Re: [Tarantool-patches] [PATCH v1 1/2] box: introduce DOUBLE field type Date: Wed, 25 Dec 2019 01:50:37 +0300 [thread overview] Message-ID: <20191224225037.GA16168@tarantool.org> (raw) In-Reply-To: <6faa3090e13cd9317baf619aa17716251c7faa27.1576944064.git.imeevma@gmail.com> On 21 Dec 19:03, imeevma@tarantool.org wrote: > diff --git a/test/engine/insert.result b/test/engine/insert.result > index 1015b6a..60c31a7 100644 > --- a/test/engine/insert.result > +++ b/test/engine/insert.result > @@ -730,3 +730,154 @@ s:drop() > fiber = nil > --- > ... > +-- Integers of Lua type NUMBER and CDATA of type int64 or uint64 > +-- cannot be inserted into this field. > +-- > +s:insert({4, 1}) > +--- > +- error: 'Tuple field 2 type does not match one required by operation: expected double' > +... Could you please add a follow-up or file an issue to make this error more clear and display actually passed type? Like '..operatiion: expected double, got integer' > + > +-- > +-- To insert an integer, we must cast it to a CDATA of type DOUBLE > +-- using ffi.cast(). Non-integers can also be inserted this way. > +-- > +s:insert({7, ffi.cast('double', 1)}) > +s:insert({8, ffi.cast('double', -9223372036854775808)}) > +s:insert({9, ffi.cast('double', tonumber('123'))}) > +s:insert({10, ffi.cast('double', tonumber64('18000000000000000000'))}) > +s:insert({11, ffi.cast('double', 1.1)}) > +s:insert({12, ffi.cast('double', -3.0009)}) Inserts are OK, but let's also test delete, update and upsert operations (a few tests just in case). The rest is OK.
next prev parent reply other threads:[~2019-12-24 22:50 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-12-21 16:03 [Tarantool-patches] [PATCH v1 0/2] Add DOUBLE type to SQL imeevma 2019-12-21 16:03 ` [Tarantool-patches] [PATCH v1 1/2] box: introduce DOUBLE field type imeevma 2019-12-24 22:50 ` Nikita Pettik [this message] 2019-12-26 16:38 ` Mergen Imeev 2019-12-26 20:34 ` Nikita Pettik 2019-12-21 16:03 ` [Tarantool-patches] [PATCH v1 2/2] sql: introduce DOUBLE type imeevma 2019-12-24 22:50 ` Nikita Pettik 2019-12-26 16:42 ` Mergen Imeev 2019-12-26 20:37 ` Nikita Pettik 2019-12-23 19:16 ` [Tarantool-patches] [PATCH v1 0/2] Add DOUBLE type to SQL Vladislav Shpilevoy 2019-12-27 12:37 ` Nikita Pettik
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20191224225037.GA16168@tarantool.org \ --to=korablev@tarantool.org \ --cc=imeevma@tarantool.org \ --cc=tarantool-patches@dev.tarantool.org \ --cc=v.shpilevoy@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH v1 1/2] box: introduce DOUBLE field type' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox