From bbdaf7b3d38166adfe3aed3db525fb2cd28a6742 Mon Sep 17 00:00:00 2001 From: Raphael Taylor-Davies Date: Sat, 30 Nov 2024 17:30:18 +0000 Subject: [PATCH] Docs --- arrow-avro/src/reader/record.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arrow-avro/src/reader/record.rs b/arrow-avro/src/reader/record.rs index 6245050c804..52a58cf6330 100644 --- a/arrow-avro/src/reader/record.rs +++ b/arrow-avro/src/reader/record.rs @@ -64,6 +64,7 @@ impl RecordDecoder { Ok(cursor.position()) } + /// Flush the decoded records into a [`RecordBatch`] pub fn flush(&mut self) -> Result { let arrays = self .fields @@ -155,6 +156,7 @@ impl Decoder { }) } + /// Append a null record fn append_null(&mut self) { match self { Self::Null(count) => *count += 1, @@ -176,6 +178,7 @@ impl Decoder { } } + /// Decode a single record from `buf` fn decode(&mut self, buf: &mut AvroCursor<'_>) -> Result<(), ArrowError> { match self { Self::Null(x) => *x += 1, @@ -216,6 +219,7 @@ impl Decoder { Ok(()) } + /// Flush decoded records to an [`ArrayRef`] fn flush(&mut self, nulls: Option) -> Result { Ok(match self { Self::Nullable(_, n, e) => e.flush(n.finish())?,