summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchenzizhan <[email protected]>2024-09-14 17:26:17 +0800
committerchenzizhan <[email protected]>2024-09-14 17:26:17 +0800
commit8a85bbf91bdae7ccab03085e5b8118fd0207e5d6 (patch)
tree5badcfe5bdd628124ee2d4d3d38bdfbd8b5127b7
parent6717b31086b40d289397569d3c70ce54abeba766 (diff)
fix: TSG-22547(use wrong precision)v4.6.5
-rw-r--r--src/cube.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cube.c b/src/cube.c
index ffbe89b..62d9933 100644
--- a/src/cube.c
+++ b/src/cube.c
@@ -555,8 +555,10 @@ int cube_set_sampling(struct cube *cube, enum sampling_mode mode, int max_n_cell
break;
case SAMPLING_MODE_TOP_CARDINALITY: {
int width, depth;
- unsigned char precision;
- spread_sketch_recommend_parameters(max_n_cell, &depth, &width, &precision);
+ unsigned char precision_dummy;
+ spread_sketch_recommend_parameters(max_n_cell, &depth, &width, &precision_dummy);
+ unsigned char precision = manifest->parameters->hll.precision;
+
cube->spread_sketch = spread_sketch_new(depth, width, precision, 0, DUMMY_TIME_VAL);
spread_sketch_set_exdata_schema(cube->spread_sketch, exdata_new_i, exdata_free_i, exdata_merge_i, exdata_reset_i, exdata_copy_i);
break; }