Creates a new cached array reader with the specified role
(
inner: Box<dyn ArrayReader>,
cache: Arc<RwLock<RowGroupCache>>,
column_idx: usize,
role: CacheRole,
metrics: ArrowReaderMetrics,
)
| 92 | impl CachedArrayReader { |
| 93 | /// Creates a new cached array reader with the specified role |
| 94 | pub fn new( |
| 95 | inner: Box<dyn ArrayReader>, |
| 96 | cache: Arc<RwLock<RowGroupCache>>, |
| 97 | column_idx: usize, |
| 98 | role: CacheRole, |
| 99 | metrics: ArrowReaderMetrics, |
| 100 | ) -> Self { |
| 101 | let batch_size = cache.read().unwrap().batch_size(); |
| 102 | |
| 103 | Self { |
| 104 | inner, |
| 105 | shared_cache: cache, |
| 106 | column_idx, |
| 107 | outer_position: 0, |
| 108 | inner_position: 0, |
| 109 | batch_size, |
| 110 | selections: BooleanBufferBuilder::new(0), |
| 111 | role, |
| 112 | local_cache: HashMap::new(), |
| 113 | metrics, |
| 114 | } |
| 115 | } |
| 116 | |
| 117 | fn get_batch_id_from_position(&self, row_id: usize) -> BatchID { |
| 118 | BatchID { |
nothing calls this directly
no test coverage detected