mirror of https://mirror.osredm.com/root/redis.git
Comment said: "XXX: check explicitly that ELE was passed, not just size" however this code is in the else block after strcasecmp already was checked for ! ELE, therefore we have already validated that this is an ELE element type. REMOVED comment for clarity.
This commit is contained in:
parent
daea83d2cf
commit
285134e43d
3
vset.c
3
vset.c
|
@ -603,8 +603,7 @@ int VSIM_RedisCommand(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) {
|
||||||
vector_args = consumed_args;
|
vector_args = consumed_args;
|
||||||
|
|
||||||
/* Apply projection if the set uses it, with the exception
|
/* Apply projection if the set uses it, with the exception
|
||||||
* of ELE type, that will already have the right dimension.
|
* of ELE type, that will already have the right dimension. */
|
||||||
* XXX: check explicitly that ELE was passed, not just size. */
|
|
||||||
if (vset->proj_matrix && dim != vset->hnsw->vector_dim) {
|
if (vset->proj_matrix && dim != vset->hnsw->vector_dim) {
|
||||||
float *projected = applyProjection(vec, vset->proj_matrix,
|
float *projected = applyProjection(vec, vset->proj_matrix,
|
||||||
vset->proj_input_size, dim);
|
vset->proj_input_size, dim);
|
||||||
|
|
Loading…
Reference in New Issue