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

Method new

arrow-json/src/reader/run_end_array.rs:40–59  ·  view source on GitHub ↗
(
        ctx: &DecoderContext,
        data_type: &DataType,
        is_nullable: bool,
    )

Source from the content-addressed store, hash-verified

38
39impl<R: RunEndIndexType> RunEndEncodedArrayDecoder<R> {
40 pub fn new(
41 ctx: &DecoderContext,
42 data_type: &DataType,
43 is_nullable: bool,
44 ) -> Result<Self, ArrowError> {
45 let values_field = match data_type {
46 DataType::RunEndEncoded(_, v) => v,
47 _ => unreachable!(),
48 };
49 let decoder = ctx.make_decoder(
50 values_field.data_type(),
51 values_field.is_nullable() || is_nullable,
52 )?;
53
54 Ok(Self {
55 data_type: data_type.clone(),
56 decoder,
57 phantom: Default::default(),
58 })
59 }
60}
61
62impl<R: RunEndIndexType + Send> ArrayDecoder for RunEndEncodedArrayDecoder<R> {

Callers

nothing calls this directly

Calls 5

defaultFunction · 0.85
make_decoderMethod · 0.45
data_typeMethod · 0.45
is_nullableMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected