veronica-m-ef commented on code in PR #7954: URL: https://github.com/apache/arrow-rs/pull/7954#discussion_r2216601845
########## arrow-avro/src/reader/record.rs: ########## @@ -301,9 +301,23 @@ impl Decoder { } Codec::Uuid => Self::Uuid(Vec::with_capacity(DEFAULT_CAPACITY)), }; - Ok(match data_type.nullability() { - Some(nullability) => Self::Nullable( - nullability, + let union_order = match data_type.nullability() { + None => None, + Some(Nullability::NullFirst) => Some(Nullability::NullFirst), + Some(Nullability::NullSecond) => { + if strict_mode { + return Err(ArrowError::ParseError( + "Found Avro union of the form ['T','null'], which is disallowed in strict_mode" + .to_string(), + )); + } + Some(Nullability::NullSecond) + } + }; Review Comment: @jecsand838 thank you for your comment. You're absolutely right, I have implemented the necessary changes and removed the strict_mode check in the `Decoder::try_new` method. Additionally I removed the `strict_mode` option from the `RecordDecoder` as it wouldn't be needed anymore. Let me know what you think :) -- 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