1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-05 13:16:09 +03:00

Address review input

This commit is contained in:
Sergei Petrunia
2021-09-11 19:43:08 +03:00
parent cf8927e9cb
commit 382250c05c
4 changed files with 78 additions and 4 deletions

View File

@@ -59,6 +59,8 @@ public:
: Histogram_builder(col, col_len, rows), histogram(hist)
{
bucket_capacity= records / histogram->get_width();
if (bucket_capacity == 0)
bucket_capacity= 1;
hist_width= histogram->get_width();
n_buckets_collected= 0;
bucket.ndv= 0;
@@ -227,7 +229,8 @@ public:
writer.end_object();
Binary_string *json_string= (Binary_string *) writer.output.get_string();
histogram->set_json_text(n_buckets_collected,
(uchar *) json_string->c_ptr());
json_string->c_ptr(),
(size_t)json_string->length());
}
};