Kriskras99 commented on code in PR #238:
URL: https://github.com/apache/avro-rs/pull/238#discussion_r2297617955


##########
avro/tests/io.rs:
##########
@@ -25,7 +25,8 @@ fn schemas_to_validate() -> &'static Vec<(&'static str, 
Value)> {
     static SCHEMAS_TO_VALIDATE_ONCE: OnceLock<Vec<(&'static str, Value)>> = 
OnceLock::new();
     SCHEMAS_TO_VALIDATE_ONCE.get_or_init(|| {
         vec![
-            (r#""null""#, Value::Null),
+            // TODO: Do we want to support this? It makes the implementation 
significantly more complex
+            // (r#""null""#, Value::Null),

Review Comment:
   `from_avro_datum*` assume they can always read at least one byte, but a 
datum with only null doesn't have any bytes. If it can't read any bytes it will 
return an UnexpectedEof.
   Thinking about it again, we can add a check to see if the schema is null and 
then just return immediately.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to