I don’t understand: why do you need at all this cmp_def?
In SQL it is extremely unlikely to be useful.
SQL has memtx/vinyl under it, where cmp_def is used, isn't it?As far as I understand, there is some mechanism, which createsstruct index with struct index_def inside memtx (for example, formemtx_tree_create()) based on what we passed inside increateIndex() in sql/build.cIs it right? I am confused.If it is right, then we can simplify code in build by always using key_def for cmp_def ?
These defs are stored only in our SQL hash. After tuple is inserted into _index,
the real key_def and cmp_def are created under the hood. And those
defs are used (see on_replace_dd_index()) in Tarantool's core.
So, I basically removed all ceremony with cmp_def during index building;
also I noticed that now only PK can feature ON REPLACE conflict action,
thus I simplified addIndexToTable routine.