martin-g commented on code in PR #238:
URL: https://github.com/apache/avro-rs/pull/238#discussion_r2297518405
##########
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:
What is the problem with it?
I am not sure whether it is really needed by someone. It was here when I
adopted the codebase.
##########
avro/Cargo.toml:
##########
@@ -73,6 +76,10 @@ thiserror = { default-features = false, version = "2.0.12" }
uuid = { default-features = false, version = "1.17.0", features = ["serde",
"std"] }
xz2 = { default-features = false, version = "0.1.7", optional = true }
zstd = { default-features = false, version = "0.13.3", optional = true }
+oval = { version = "2.0.0", features = ["bytes"] }
+futures = "0.3.31"
+async-stream = "0.3.6"
+colored-hexdump = "0.2.2"
Review Comment:
Is this used somewhere ? I guess you use it for debugging
##########
avro/tests/io.rs:
##########
@@ -232,7 +234,11 @@ fn test_round_trip() -> TestResult {
for (raw_schema, value) in schemas_to_validate().iter() {
let schema = Schema::parse_str(raw_schema)?;
let encoded = to_avro_datum(&schema, value.clone()).unwrap();
- let decoded = from_avro_datum(&schema, &mut Cursor::new(encoded),
None).unwrap();
+ let decoded = from_avro_datum(&schema, &mut Cursor::new(encoded),
None);
+ if decoded.is_err() {
+ println!("{schema:#?}");
Review Comment:
```suggestion
// TODO: remove before merging
println!("{schema:#?}");
```
--
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]