jecsand838 commented on code in PR #7834: URL: https://github.com/apache/arrow-rs/pull/7834#discussion_r2198286187
########## arrow-avro/src/reader/record.rs: ########## @@ -37,34 +36,43 @@ use std::sync::Arc; const DEFAULT_CAPACITY: usize = 1024; /// Decodes avro encoded data into [`RecordBatch`] +#[derive(Debug)] pub struct RecordDecoder { schema: SchemaRef, fields: Vec<Decoder>, use_utf8view: bool, + strict_mode: bool, } impl RecordDecoder { /// Create a new [`RecordDecoder`] from the provided [`AvroDataType`] with default options pub fn try_new(data_type: &AvroDataType) -> Result<Self, ArrowError> { - Self::try_new_with_options(data_type, ReadOptions::default()) + Self::try_new_with_options(data_type, false, false) } - /// Create a new [`RecordDecoder`] from the provided [`AvroDataType`] with additional options + /// Creates a new [`RecordDecoder`] from the provided [`AvroDataType`] with additional options. /// /// This method allows you to customize how the Avro data is decoded into Arrow arrays. /// - /// # Parameters - /// * `data_type` - The Avro data type to decode - /// * `options` - Configuration options for decoding + /// # Arguments + /// * `data_type` - The Avro data type to decode. + /// * `use_utf8view` - A flag indicating whether to use `Utf8View` for string types. + /// * `strict_mode` - A flag to enable strict decoding, returning an error if the data + /// does not conform to the schema. + /// + /// # Errors + /// This function will return an error if the provided `data_type` is not a `Record`. pub fn try_new_with_options( data_type: &AvroDataType, - options: ReadOptions, + use_utf8view: bool, Review Comment: Another good call out. I just pushed up those changes marking `RecordDecoder` and it's methods as `pub(crate)`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org