Tarantool development patches archive
 help / color / mirror / Atom feed
From: Konstantin Osipov <kostja@tarantool.org>
To: tarantool-patches@freelists.org
Cc: v.shpilevoy@tarantool.org, Nikita Pettik <korablev@tarantool.org>
Subject: [tarantool-patches] Re: [PATCH 1/2] sql: refactor sql_expr_coll and sql_binary_compare_coll_seq functions
Date: Thu, 17 Jan 2019 16:28:02 +0300	[thread overview]
Message-ID: <20190117132802.GN28204@chai> (raw)
In-Reply-To: <276917ac3b405134ae0f075127888912395d511e.1547644179.git.korablev@tarantool.org>

* Nikita Pettik <korablev@tarantool.org> [19/01/16 17:06]:
> Lets make sql_expr_coll() return error code for two reasons. Firstly,
> we are going to use this function to detect operands of concatenation
> with incompatible collations. Secondly, pointer to struct coll in most
> cases is redundant since collation id (which in turn returned via output
> parameter) is enough to proceed the same operations.

It is redundant but it is potentially faster. What are benefits of
changing a pointer to an id? This looks like de-optimization.

> For the same reason lets make sql_binary_compare_coll_seq() return
> collation id instead of struct coll* and remove corresponding output
> parameter.

It should be always possible to query id from struct coll. I don't
see a reason to operate with ids in the source code anywhere but
in DDL.

Moreover, if we keep changing it back and forth to our taste it
will be a mess. 

the general rule for space id, index id, coll id is that they
should not be used unless necessary for locking/consistency
reasons.

-- 
Konstantin Osipov, Moscow, Russia, +7 903 626 22 32
http://tarantool.io - www.twitter.com/kostja_osipov

  reply	other threads:[~2019-01-17 13:28 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-16 13:13 [tarantool-patches] [PATCH 0/2] Compute derived collation for concatenation Nikita Pettik
2019-01-16 13:13 ` [tarantool-patches] [PATCH 1/2] sql: refactor sql_expr_coll and sql_binary_compare_coll_seq functions Nikita Pettik
2019-01-17 13:28   ` Konstantin Osipov [this message]
2019-01-24 18:28   ` [tarantool-patches] " Vladislav Shpilevoy
2019-02-14 23:26     ` n.pettik
2019-01-16 13:13 ` [tarantool-patches] [PATCH 2/2] sql: compute resulting collation for concatenation Nikita Pettik
2019-01-17 13:33   ` [tarantool-patches] " Konstantin Osipov
2019-01-17 19:19     ` n.pettik
2019-01-18  9:59     ` Kirill Yukhin
2019-01-24 18:29   ` Vladislav Shpilevoy
2019-02-14 23:26     ` n.pettik
2019-02-22 11:23       ` Vladislav Shpilevoy
2019-02-22 13:40         ` n.pettik
2019-02-22 13:51           ` Vladislav Shpilevoy
2019-02-25 11:29 ` [tarantool-patches] Re: [PATCH 0/2] Compute derived " 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=20190117132802.GN28204@chai \
    --to=kostja@tarantool.org \
    --cc=korablev@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='[tarantool-patches] Re: [PATCH 1/2] sql: refactor sql_expr_coll and sql_binary_compare_coll_seq functions' \
    /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