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

Function new_decoder

arrow-avro/benches/decoder.rs:352–366  ·  view source on GitHub ↗
(
    schema_json: &'static str,
    batch_size: usize,
    utf8view: bool,
)

Source from the content-addressed store, hash-verified

350const SMALL_BATCH: usize = 4096;
351
352fn new_decoder(
353 schema_json: &'static str,
354 batch_size: usize,
355 utf8view: bool,
356) -> arrow_avro::reader::Decoder {
357 let schema = AvroSchema::new(schema_json.parse().unwrap());
358 let mut store = arrow_avro::schema::SchemaStore::new();
359 store.register(schema.clone()).unwrap();
360 ReaderBuilder::new()
361 .with_writer_schema_store(store)
362 .with_batch_size(batch_size)
363 .with_utf8_view(utf8view)
364 .build_decoder()
365 .expect("failed to build decoder")
366}
367
368fn new_decoder_id(
369 schema_json: &'static str,

Callers 1

criterion_benchesFunction · 0.70

Calls 7

parseMethod · 0.45
registerMethod · 0.45
cloneMethod · 0.45
build_decoderMethod · 0.45
with_utf8_viewMethod · 0.45
with_batch_sizeMethod · 0.45

Tested by

no test coverage detected