@@ -46,6 +46,11 @@ struct pair_extract_key {
4646/* *
4747 * Base class for Tuple sketch.
4848 * This is an extension of Theta sketch that allows keeping arbitrary Summary associated with each retained key.
49+ *
50+ * Summary that may retain string values.
51+ * For Summary containing strings, cross-language portability depends on
52+ * using compatible string encodings. This class does not by itself enforce
53+ * UTF-8 validity for all string inputs.
4954 */
5055template <
5156 typename Summary,
@@ -253,6 +258,9 @@ class update_tuple_sketch: public tuple_sketch<Summary, Allocator> {
253258
254259 /* *
255260 * Update this sketch with a given string.
261+ * If the summary contains strings and cross-language portability is required,
262+ * callers should ensure that any strings in the summary
263+ * use a compatible encoding (valid UTF-8).
256264 * @param key string to update the sketch with
257265 * @param value to update the sketch with
258266 */
@@ -261,6 +269,9 @@ class update_tuple_sketch: public tuple_sketch<Summary, Allocator> {
261269
262270 /* *
263271 * Update this sketch with a given unsigned 64-bit integer.
272+ * If the summary contains strings and cross-language portability is required,
273+ * callers should ensure that any strings in the summary
274+ * use a compatible encoding (valid UTF-8).
264275 * @param key uint64_t to update the sketch with
265276 * @param value to update the sketch with
266277 */
@@ -269,6 +280,9 @@ class update_tuple_sketch: public tuple_sketch<Summary, Allocator> {
269280
270281 /* *
271282 * Update this sketch with a given signed 64-bit integer.
283+ * If the summary contains strings and cross-language portability is required,
284+ * callers should ensure that any strings in the summary
285+ * use a compatible encoding (valid UTF-8).
272286 * @param key int64_t to update the sketch with
273287 * @param value to update the sketch with
274288 */
@@ -277,6 +291,9 @@ class update_tuple_sketch: public tuple_sketch<Summary, Allocator> {
277291
278292 /* *
279293 * Update this sketch with a given unsigned 32-bit integer.
294+ * If the summary contains strings and cross-language portability is required,
295+ * callers should ensure that any strings in the summary
296+ * use a compatible encoding (valid UTF-8).
280297 * For compatibility with Java implementation.
281298 * @param key uint32_t to update the sketch with
282299 * @param value to update the sketch with
@@ -286,6 +303,9 @@ class update_tuple_sketch: public tuple_sketch<Summary, Allocator> {
286303
287304 /* *
288305 * Update this sketch with a given signed 32-bit integer.
306+ * If the summary contains strings and cross-language portability is required,
307+ * callers should ensure that any strings in the summary
308+ * use a compatible encoding (valid UTF-8).
289309 * For compatibility with Java implementation.
290310 * @param key int32_t to update the sketch with
291311 * @param value to update the sketch with
@@ -295,6 +315,9 @@ class update_tuple_sketch: public tuple_sketch<Summary, Allocator> {
295315
296316 /* *
297317 * Update this sketch with a given unsigned 16-bit integer.
318+ * If the summary contains strings and cross-language portability is required,
319+ * callers should ensure that any strings in the summary
320+ * use a compatible encoding (valid UTF-8).
298321 * For compatibility with Java implementation.
299322 * @param key uint16_t to update the sketch with
300323 * @param value to update the sketch with
@@ -304,6 +327,9 @@ class update_tuple_sketch: public tuple_sketch<Summary, Allocator> {
304327
305328 /* *
306329 * Update this sketch with a given signed 16-bit integer.
330+ * If the summary contains strings and cross-language portability is required,
331+ * callers should ensure that any strings in the summary
332+ * use a compatible encoding (valid UTF-8).
307333 * For compatibility with Java implementation.
308334 * @param key int16_t to update the sketch with
309335 * @param value to update the sketch with
@@ -313,6 +339,9 @@ class update_tuple_sketch: public tuple_sketch<Summary, Allocator> {
313339
314340 /* *
315341 * Update this sketch with a given unsigned 8-bit integer.
342+ * If the summary contains strings and cross-language portability is required,
343+ * callers should ensure that any strings in the summary
344+ * use a compatible encoding (valid UTF-8).
316345 * For compatibility with Java implementation.
317346 * @param key uint8_t to update the sketch with
318347 * @param value to update the sketch with
@@ -322,6 +351,9 @@ class update_tuple_sketch: public tuple_sketch<Summary, Allocator> {
322351
323352 /* *
324353 * Update this sketch with a given signed 8-bit integer.
354+ * If the summary contains strings and cross-language portability is required,
355+ * callers should ensure that any strings in the summary
356+ * use a compatible encoding (valid UTF-8).
325357 * For compatibility with Java implementation.
326358 * @param key int8_t to update the sketch with
327359 * @param value to update the sketch with
@@ -331,6 +363,9 @@ class update_tuple_sketch: public tuple_sketch<Summary, Allocator> {
331363
332364 /* *
333365 * Update this sketch with a given double-precision floating point value.
366+ * If the summary contains strings and cross-language portability is required,
367+ * callers should ensure that any strings in the summary
368+ * use a compatible encoding (valid UTF-8).
334369 * For compatibility with Java implementation.
335370 * @param key double to update the sketch with
336371 * @param value to update the sketch with
@@ -340,6 +375,9 @@ class update_tuple_sketch: public tuple_sketch<Summary, Allocator> {
340375
341376 /* *
342377 * Update this sketch with a given floating point value.
378+ * If the summary contains strings and cross-language portability is required,
379+ * callers should ensure that any strings in the summary
380+ * use a compatible encoding (valid UTF-8).
343381 * For compatibility with Java implementation.
344382 * @param key float to update the sketch with
345383 * @param value to update the sketch with
@@ -357,6 +395,9 @@ class update_tuple_sketch: public tuple_sketch<Summary, Allocator> {
357395 * Otherwise two sketches that should represent overlapping sets will be disjoint
358396 * For instance, for signed 32-bit values call update(int32_t) method above,
359397 * which does widening conversion to int64_t, if compatibility with Java is expected
398+ * If the summary contains strings and cross-language portability is required,
399+ * callers should ensure that any strings in the summary
400+ * use a compatible encoding (valid UTF-8).
360401 * @param key pointer to the data
361402 * @param length of the data in bytes
362403 * @param value to update the sketch with
0 commit comments