From: Nikita Pettik <korablev@tarantool.org>
To: Mergen Imeev <imeevma@tarantool.org>
Cc: tarantool-discussions@dev.tarantool.org
Subject: Re: [Tarantool-discussions] Implicit cast for COMPARISON
Date: Wed, 22 Jan 2020 17:24:22 +0300 [thread overview]
Message-ID: <20200122142422.GC1144@tarantool.org> (raw)
In-Reply-To: <20200122141352.GA3367@tarantool.org>
On 22 Jan 17:13, Mergen Imeev wrote:
> Hi! Thanks for answering.
>
> On Tue, Jan 21, 2020 at 11:09:25AM -0700, Peter Gulutzan wrote:
> > Hi,
> >
> > On 2020-01-21 4:11 a.m., Mergen Imeev wrote:
> > If the above example is correct, it differs from NoSQL behaviour:
> > box.schema.space.create('T')
> > box.space.T:create_index('I')
> > box.space.T:insert{1}
> > box.space.T:select('A')
> > Currently, returns: Supplied key type of part 0 does not match index part
> > type
> > After fix, returns: Supplied key type of part 0 does not match index part
> > type
> > (No change because the proposed fix is for SQL not Lua)
> >
> > And, since there is no change suggested for assignment,
> > implicit cast would still occur. Therefore:
> >
> > CREATE TABLE t (s1 INTEGER PRIMARY KEY);
> > INSERT INTO t VALUES ('1');
> > Currently, returns: no error
> > After fix, returns: no error
> > (No change because assignments cause implicit cast)
> >
> > SELECT UPPER(FALSE) FROM t;
> > Currently, returns: 'FALSE' (string)
> > After fix, returns: 'FALSE' (string)
> > (No change because functions can cause assignments)
> >
> > I think that the proposed change is good.
> >
> > Peter Gulutzan
> >
> >
> Still, I think the idea of using SCALAR rules is viable.
> But I suggest adding this as one of the session settings.
IMHO pretty bad idea: too much effort is required to support it;
on the other hand, I can't come up with real use case for this
feature. Configurable type system is an evil.
next prev parent reply other threads:[~2020-01-22 14:24 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-21 11:11 Mergen Imeev
2020-01-21 18:09 ` Peter Gulutzan
2020-01-22 14:13 ` Mergen Imeev
2020-01-22 14:24 ` Nikita Pettik [this message]
2020-01-30 18:51 ` Konstantin Osipov
2020-01-22 16:43 ` Peter Gulutzan
2020-01-30 18:52 ` Konstantin Osipov
2020-02-03 11:35 ` Mergen Imeev
2020-02-03 15:02 ` Konstantin Osipov
2020-02-04 18:50 ` Nikita Pettik
2020-02-05 2:57 ` Peter Gulutzan
2020-02-07 14:24 ` Nikita Pettik
2020-02-07 14:40 ` Konstantin Osipov
2020-02-07 22:30 ` Peter Gulutzan
2020-02-11 13:32 ` Mergen Imeev
2020-02-05 7:52 ` Mergen Imeev
2020-02-06 12:41 ` Mergen Imeev
2020-02-06 13:09 ` Mergen Imeev
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=20200122142422.GC1144@tarantool.org \
--to=korablev@tarantool.org \
--cc=imeevma@tarantool.org \
--cc=tarantool-discussions@dev.tarantool.org \
--subject='Re: [Tarantool-discussions] Implicit cast for COMPARISON' \
/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