MCPcopy Create free account
hub / github.com/apache/datafusion / assert_utf8_utf8view_match

Function assert_utf8_utf8view_match

datafusion/core/benches/topk_aggregate.rs:301–327  ·  view source on GitHub ↗
(
    rt: &Runtime,
    partitions: i32,
    samples: i32,
    limit: usize,
    asc: bool,
    use_topk: bool,
)

Source from the content-addressed store, hash-verified

299}
300
301fn assert_utf8_utf8view_match(
302 rt: &Runtime,
303 partitions: i32,
304 samples: i32,
305 limit: usize,
306 asc: bool,
307 use_topk: bool,
308) {
309 let ctx_utf8 = rt
310 .block_on(create_context(partitions, samples, asc, use_topk, false))
311 .unwrap();
312 let ctx_view = rt
313 .block_on(create_context(partitions, samples, asc, use_topk, true))
314 .unwrap();
315 let batches_utf8 = rt
316 .block_on(aggregate_string(ctx_utf8, limit, use_topk))
317 .unwrap();
318 let batches_view = rt
319 .block_on(aggregate_string(ctx_view, limit, use_topk))
320 .unwrap();
321 let result_utf8 = pretty_format_batches(&batches_utf8).unwrap().to_string();
322 let result_view = pretty_format_batches(&batches_view).unwrap().to_string();
323 assert_eq!(
324 result_utf8, result_view,
325 "Utf8 vs Utf8View mismatch for asc={asc}, use_topk={use_topk}"
326 );
327}
328
329fn assert_string_results_match(
330 rt: &Runtime,

Callers 1

Calls 3

aggregate_stringFunction · 0.85
create_contextFunction · 0.70
to_stringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…