Skip to content

Commit

Permalink
Fix to select operator
Browse files Browse the repository at this point in the history
  • Loading branch information
Griezn committed Dec 4, 2024
1 parent 5486acd commit a7d9f62
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/query.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ void window(const data_t *in, data_t *out, const parameter_t param)
/// @param param The select parameter containing an array with the wanted predicates
void select_query(const data_t *in, data_t *out, const parameter_t param)
{
const uint32_t size = in->size * (in->width / param.select.size);
const uint32_t size = in->size * param.select.size;
out->data = malloc(size * sizeof(triple_t));
out->size = in->size;
out->width = param.select.size;
Expand All @@ -89,7 +89,6 @@ void select_query(const data_t *in, data_t *out, const parameter_t param)
for (uint32_t j = 0; j < in->width; ++j) {
if (select_check(in, i * in->width + j, param.select)) {
out->data[out_idx++] = in->data[i * in->width + j];
break;
}
}
}
Expand Down

0 comments on commit a7d9f62

Please sign in to comment.