From: Konstantin Osipov <kostja.osipov@gmail.com>
To: tarantool-patches@freelists.org
Cc: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>,
Kirill Shcherbatov <kshcherbatov@tarantool.org>
Subject: [tarantool-patches] Re: [PATCH v1 1/1] sql: invalid integer type in arithmetic operations
Date: Thu, 25 Apr 2019 13:52:37 +0300 [thread overview]
Message-ID: <20190425105237.GA2297@atlas> (raw)
In-Reply-To: <20190425104956.GI29257@atlas>
* Konstantin Osipov <kostja.osipov@gmail.com> [19/04/25 13:49]:
> * n.pettik <korablev@tarantool.org> [19/04/25 09:18]:
> > Surely, we still can create space and set format with unsigned types
> > from Lua, so strictly speaking UNSIGNED is allowed even now.
> > But we can’t set UNSIGNED as a type of column in SQL, and we don’t
> > set this type in meta. So in some sense it is not allowed.
> > Mb it is worth fixing comment. Or return _UNSIGNED instead
> > of _NUMBER in this case. I guess there will be no severe consequences.
>
> SQL *is* server. Please begin by having a comment containing a
> table for integer type arithmetics, something like this:
>
> Plus operation:
> --------------
>
> integer float
>
> integer integer float
> float float float
>
> It's best to implement such table in the source code too, and not
> have complicated branching.
Re UNSIGNED type itself:
once you have a proper table for type arithmetics, it will be easy
to understand what the result of unsigned + unsigned should be.
Most likely it should be unsigned, not a number.
--
Konstantin Osipov, Moscow, Russia, +7 903 626 22 32
http://tarantool.io - www.twitter.com/kostja_osipov
next prev parent reply other threads:[~2019-04-25 10:52 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-24 15:36 [tarantool-patches] " Kirill Shcherbatov
2019-04-24 19:43 ` [tarantool-patches] " n.pettik
2019-04-25 7:32 ` Kirill Shcherbatov
2019-04-24 19:56 ` Vladislav Shpilevoy
2019-04-24 23:03 ` n.pettik
2019-04-25 10:49 ` Konstantin Osipov
2019-04-25 10:52 ` Konstantin Osipov [this message]
2019-04-25 11:07 ` Kirill Shcherbatov
2019-04-25 11:15 ` Konstantin Osipov
2019-04-25 11:21 ` Kirill Shcherbatov
2019-04-25 10:37 ` Kirill Yukhin
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=20190425105237.GA2297@atlas \
--to=kostja.osipov@gmail.com \
--cc=kshcherbatov@tarantool.org \
--cc=tarantool-patches@freelists.org \
--cc=v.shpilevoy@tarantool.org \
--subject='[tarantool-patches] Re: [PATCH v1 1/1] sql: invalid integer type in arithmetic operations' \
/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