MCPcopy Create free account
hub / github.com/apache/arrow-rs / assert_bytes_eq

Function assert_bytes_eq

arrow-avro/src/writer/encoder.rs:2462–2476  ·  view source on GitHub ↗
(actual: &[u8], expected: &[u8])

Source from the content-addressed store, hash-verified

2460 }
2461
2462 fn assert_bytes_eq(actual: &[u8], expected: &[u8]) {
2463 if actual != expected {
2464 let to_hex = |b: &[u8]| {
2465 b.iter()
2466 .map(|x| format!("{:02X}", x))
2467 .collect::<Vec<_>>()
2468 .join(" ")
2469 };
2470 panic!(
2471 "mismatch\n expected: [{}]\n actual: [{}]",
2472 to_hex(expected),
2473 to_hex(actual)
2474 );
2475 }
2476 }
2477
2478 fn row_slice<'a>(buf: &'a [u8], offsets: &[usize], row: usize) -> &'a [u8] {
2479 let start = offsets[row];

Callers 15

binary_encoderFunction · 0.85
large_binary_encoderFunction · 0.85
utf8_encoderFunction · 0.85
large_utf8_encoderFunction · 0.85
list_encoder_int32Function · 0.85
enum_encoder_dictionaryFunction · 0.85
decimal_bytes_and_fixedFunction · 0.85
decimal_bytes_256Function · 0.85

Calls 2

joinMethod · 0.80
iterMethod · 0.45

Tested by 15

binary_encoderFunction · 0.68
large_binary_encoderFunction · 0.68
utf8_encoderFunction · 0.68
large_utf8_encoderFunction · 0.68
list_encoder_int32Function · 0.68
enum_encoder_dictionaryFunction · 0.68
decimal_bytes_and_fixedFunction · 0.68
decimal_bytes_256Function · 0.68