(
schema_json: &'static str,
batch_size: usize,
utf8view: bool,
id: u32,
)
| 366 | } |
| 367 | |
| 368 | fn new_decoder_id( |
| 369 | schema_json: &'static str, |
| 370 | batch_size: usize, |
| 371 | utf8view: bool, |
| 372 | id: u32, |
| 373 | ) -> arrow_avro::reader::Decoder { |
| 374 | let schema = AvroSchema::new(schema_json.parse().unwrap()); |
| 375 | let mut store = arrow_avro::schema::SchemaStore::new_with_type(FingerprintAlgorithm::Id); |
| 376 | // Register the schema with a provided Confluent-style ID |
| 377 | store |
| 378 | .set(Fingerprint::Id(id), schema.clone()) |
| 379 | .expect("failed to set schema with id"); |
| 380 | ReaderBuilder::new() |
| 381 | .with_writer_schema_store(store) |
| 382 | .with_active_fingerprint(Fingerprint::Id(id)) |
| 383 | .with_batch_size(batch_size) |
| 384 | .with_utf8_view(utf8view) |
| 385 | .build_decoder() |
| 386 | .expect("failed to build decoder for id") |
| 387 | } |
| 388 | |
| 389 | const SIZES: [usize; 3] = [100, 10_000, 1_000_000]; |
| 390 |
no test coverage detected