diff options
| author | chenzizhan <[email protected]> | 2024-07-17 11:11:03 +0800 |
|---|---|---|
| committer | chenzizhan <[email protected]> | 2024-07-17 11:11:03 +0800 |
| commit | dccb4ce1fd92b1f142383e585487af08831264d3 (patch) | |
| tree | 4dbc24c2c4834d4590a84464daeffe1a9a55a64d /src/cube.c | |
| parent | 6595cbbde1280b6c7d3c445697e39aa18fa9741f (diff) | |
fix ci
Diffstat (limited to 'src/cube.c')
| -rw-r--r-- | src/cube.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -943,7 +943,7 @@ int cube_counter_incrby(struct cube *cube, int metric_id, const struct field *di } if (cube->primary_metric_id == metric_id && cube->sampling_mode == SAMPLING_MODE_TOPK) { - if (increment <= 0) { + if (increment < 0) { return FS_ERR_INVALID_PARAM; } @@ -1299,9 +1299,12 @@ int cube_hll_get(const struct cube *cube, int metric_id, const struct field_list field_array_to_key(fields->field, fields->n_field, &dimension_in_string, &dimension_string_len); double hll_value = spread_sketch_get_cardinality(cube->spread_sketch, dimension_in_string, dimension_string_len); - *value = hll_value; - free(dimension_in_string); + if (hll_value < 0) { + return FS_ERR_INVALID_TAG; + } + + *value = hll_value; return FS_OK; } |
