[tarantool-patches] Re: [PATCH v2] sql: Duplicate key error for a non-unique index

Vladimir Davydov vdavydov.dev at gmail.com
Mon Mar 4 20:53:22 MSK 2019


On Fri, Mar 01, 2019 at 02:46:45PM +0300, Stanislav Zudin wrote:
> +/**
> + * Check whether the first collation is compatible
> + * with the second one.
> + * */
> +bool
> +coll_is_compatible(const struct coll *first, const struct coll* second);

I renamed coll_is_compatible to coll_can_merge (so that it matches
key_def_can_merge), because compatibility is typically a symmetric
relationship (if a is compatible with b, then b is compatible with a)
while this function is asymmetric. I also added some comments explaining
the logic behind the decisions made by coll_is_compatible and pushed the
patch to 2.1.



More information about the Tarantool-patches mailing list