[tarantool-patches] Re: [PATCH 1/2] sql: refactor sql_expr_coll and sql_binary_compare_coll_seq functions
kostja at tarantool.org
Thu Jan 17 16:28:02 MSK 2019
* Nikita Pettik <korablev at 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
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
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
Konstantin Osipov, Moscow, Russia, +7 903 626 22 32
http://tarantool.io - www.twitter.com/kostja_osipov
More information about the Tarantool-patches