xml_arrow/reader/
options.rs1const DEFAULT_BATCH_SIZE: usize = 1024;
2const DEFAULT_MAX_RECORD_BYTES: usize = 8 * 1024 * 1024;
3const DEFAULT_MAX_BATCH_BYTES: usize = 64 * 1024 * 1024;
4const DEFAULT_MAX_DEPTH: usize = 128;
5
6#[derive(Clone, Debug)]
8pub struct ReaderOptions {
9 pub batch_size: usize,
11 pub max_record_bytes: usize,
15 pub max_batch_bytes: usize,
18 pub max_depth: usize,
20 pub projection: Option<Vec<usize>>,
22}
23
24impl Default for ReaderOptions {
25 fn default() -> Self {
26 Self {
27 batch_size: DEFAULT_BATCH_SIZE,
28 max_record_bytes: DEFAULT_MAX_RECORD_BYTES,
29 max_batch_bytes: DEFAULT_MAX_BATCH_BYTES,
30 max_depth: DEFAULT_MAX_DEPTH,
31 projection: None,
32 }
33 }
34}
35
36const DEFAULT_MAX_SAMPLE_RECORDS: usize = 128;
37const DEFAULT_MAX_SAMPLE_BYTES: usize = 8 * 1024 * 1024;
38
39#[derive(Clone, Debug)]
41pub struct InferenceOptions {
42 pub max_records: usize,
44 pub max_bytes: usize,
47}
48
49impl Default for InferenceOptions {
50 fn default() -> Self {
51 Self {
52 max_records: DEFAULT_MAX_SAMPLE_RECORDS,
53 max_bytes: DEFAULT_MAX_SAMPLE_BYTES,
54 }
55 }
56}