Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pola-rs
GitHub Repository: pola-rs/polars
Path: blob/main/crates/polars-parquet/src/arrow/read/deserialize/binview/required.rs
8509 views
1
use arrow::array::MutableBinaryViewArray;
2
3
use super::decode_plain_generic;
4
use crate::parquet::error::ParquetResult;
5
6
pub fn decode(
7
num_expected_values: usize,
8
values: &[u8],
9
limit: Option<usize>,
10
target: &mut MutableBinaryViewArray<[u8]>,
11
12
verify_utf8: bool,
13
) -> ParquetResult<()> {
14
let limit = limit.unwrap_or(num_expected_values);
15
16
let mut idx = 0;
17
decode_plain_generic(
18
values,
19
target,
20
limit,
21
|| {
22
if idx >= limit {
23
return None;
24
}
25
26
idx += 1;
27
28
Some((true, true))
29
},
30
verify_utf8,
31
)
32
}
33
34