scovich commented on code in PR #7276: URL: https://github.com/apache/arrow-rs/pull/7276#discussion_r1992078525
########## arrow-json/src/reader/null_array.rs: ########## @@ -21,13 +21,24 @@ use arrow_data::{ArrayData, ArrayDataBuilder}; use arrow_schema::{ArrowError, DataType}; #[derive(Default)] -pub struct NullArrayDecoder {} +pub struct NullArrayDecoder { + ignore_type_conflicts: bool, +} +impl NullArrayDecoder { + pub fn new(ignore_type_conflicts: bool) -> Self { + Self { + ignore_type_conflicts, + } + } +} impl ArrayDecoder for NullArrayDecoder { fn decode(&mut self, tape: &Tape<'_>, pos: &[u32]) -> Result<ArrayData, ArrowError> { - for p in pos { - if !matches!(tape.get(*p), TapeElement::Null) { - return Err(tape.error(*p, "null")); + if !self.ignore_type_conflicts { + for p in pos { + if !matches!(tape.get(*p), TapeElement::Null) { + return Err(tape.error(*p, "null")); + } Review Comment: NOTE: Indentation-only change -- 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