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:
Rowan Trollope 2025-01-31 17:43:23 -06:00 committed by antirez
parent daea83d2cf
commit 285134e43d
1 changed files with 1 additions and 2 deletions

3
vset.c
View File

@ -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);