MCPcopy Create free account
hub / github.com/apache/paimon-rust / test_build_column_binary

Function test_build_column_binary

crates/paimon/src/arrow/format/avro.rs:841–856  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

839
840 #[test]
841 fn test_build_column_binary() {
842 let records = make_records(vec![
843 vec![("b", av_bytes(&[0xDE, 0xAD]))],
844 vec![("b", av_bytes(&[0xBE, 0xEF]))],
845 ]);
846 let col = build_column(
847 &records,
848 "b",
849 &DataType::VarBinary(VarBinaryType::new(100).unwrap()),
850 2,
851 )
852 .unwrap();
853 let arr = col.as_any().downcast_ref::<BinaryArray>().unwrap();
854 assert_eq!(arr.value(0), &[0xDE, 0xAD]);
855 assert_eq!(arr.value(1), &[0xBE, 0xEF]);
856 }
857
858 #[test]
859 fn test_build_column_decimal_from_bytes() {

Callers

nothing calls this directly

Calls 3

make_recordsFunction · 0.85
build_columnFunction · 0.85
as_anyMethod · 0.45

Tested by

no test coverage detected