You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@avro.apache.org by "flxo (via GitHub)" <gi...@apache.org> on 2026/07/03 09:11:51 UTC

[I] Feature request: `SchemaAwareResolvingDeserializer` — direct-to-type schema evolution without the intermediate `Value` [avro-rs]

flxo opened a new issue, #575:
URL: https://github.com/apache/avro-rs/issues/575

   # Summary
   
   First of all, thank you very much for your work on `avro-rs`! The `SchemaAwareDeserializer` introduced in #512  is a great addition.
   
   I would like to kindly ask about the status of the *resolving* counterpart to that deserializer. Today, `SchemaAwareDeserializer` decodes directly into `T` only when the reader schema matches the writer schema. As soon as a reader schema differs , the serde path deliberately bails out with a `todo!`/`panic!`, pointing at a not-yet-implemented `SchemaAwareResolvingDeserializer`.
   
   I haven't found a tracking ticket for this.
   
   # Where this shows up in the code
   
   The gap is marked with three matching `TODO`s on `main`(pinned to `660c655cac0cdf3bc5c6818bf6b5e445eb09bdce`):
   
   - `GenericDatumReader::read_deser`
     [avro/src/reader/datum.rs#L149-L150](https://github.com/apache/avro-rs/blob/660c655cac0cdf3bc5c6818bf6b5e445eb09bdce/avro/src/reader/datum.rs#L149-L150)
     ```rust
     // TODO: Implement SchemaAwareResolvingDeserializer
     panic!("Schema aware deserialisation does not resolve schemas yet");
     ```
   - `Reader` (object-container path)
     [avro/src/reader/mod.rs#L134-L137](https://github.com/apache/avro-rs/blob/660c655cac0cdf3bc5c6818bf6b5e445eb09bdce/avro/src/reader/mod.rs#L134-L137)
     ```rust
     // TODO: Implement SchemaAwareResolvingDeserializer
     ...
     "Schema aware deserialisation does not resolve schemas yet"
     ```
   - `BlockReader`
     [avro/src/reader/block.rs#L233-L234](https://github.com/apache/avro-rs/blob/660c655cac0cdf3bc5c6818bf6b5e445eb09bdce/avro/src/reader/block.rs#L233-L234)
     ```rust
     // TODO: Implement SchemaAwareResolvingDeserializer
     panic!("Schema aware deserialisation does not resolve schemas yet");
     ```
   
   The non-resolving deserializer itself lives in [avro/src/serde/deser_schema/mod.rs](https://github.com/apache/avro-rs/blob/660c655cac0cdf3bc5c6818bf6b5e445eb09bdce/avro/src/serde/deser_schema/mod.rs) and carries a single schema, doing no writer→reader resolution.
   
   # Why it matters
   
   Currently, schema evolution is only available on the `Value` route: decode to `Value` against the writer schema, then `Value::resolve*` against the reader schema, then optionally `from_value::<T>()`. This allocates a full `Value` tree (and, without a cached `ResolvedSchema`, a fresh name map) per record — precisely the overhead the schema-aware deserializer was designed to avoid. A resolving deserializer would close that gap and, as noted in the #512  description, could eventually allow deprecating `from_value` / `to_value` entirely.
   
   # Request
   
   Would you be willing to share the implementation state of a `SchemaAwareResolvingDeserializer`? 
   
   I completely understand this is volunteer-maintained work and that priorities and timelines shift; please take this only as gentle interest, not pressure!
   
   Thanks,
   
   @flxo 
   


-- 
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: issues-unsubscribe@avro.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Feature request: `SchemaAwareResolvingDeserializer` — direct-to-type schema evolution without the intermediate `Value` [avro-rs]

Posted by "Kriskras99 (via GitHub)" <gi...@apache.org>.
Kriskras99 commented on issue #575:
URL: https://github.com/apache/avro-rs/issues/575#issuecomment-4886621986

   It's 80% done, but the remaining 20% is the hard part. But it has been on hold while I have been working on `avro_derive`. I don't expect it to make it into the 0.22 release.


-- 
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: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Feature request: `SchemaAwareResolvingDeserializer` — direct-to-type schema evolution without the intermediate `Value` [avro-rs]

Posted by "kevinjqliu (via GitHub)" <gi...@apache.org>.
kevinjqliu commented on issue #575:
URL: https://github.com/apache/avro-rs/issues/575#issuecomment-6203324706

   hey! we'd love to use this in iceberg-rust 😄 right now we have a stopgap adapter (`Resolved<T>`) that does part of the resolution ourselves, and this would let us drop it.
   
   this would also match Java Avro. `SpecificDatumReader(writer, reader)` resolves while decoding straight into the target type through `ResolvingDecoder`, no intermediate generic values.
   
   one ask: could it keep ignoring record names when resolving records, like `Value::resolve` does today? Java does the same, `Resolver.RecordAdjust` [skips the record name check on purpose](https://github.com/apache/avro/blob/main/lang/java/avro/src/main/java/org/apache/avro/Resolver.java) for compatibility. The Iceberg spec doesn't define Avro record names, so we'd rather not depend on them when reading manifests.
   
   context: apache/iceberg-rust#3354 and apache/iceberg-rust#3466
   


-- 
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: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Feature request: `SchemaAwareResolvingDeserializer` — direct-to-type schema evolution without the intermediate `Value` [avro-rs]

Posted by "flxo (via GitHub)" <gi...@apache.org>.
flxo commented on issue #575:
URL: https://github.com/apache/avro-rs/issues/575#issuecomment-4890273289

   > It's 80% done, but the remaining 20% is the hard part. But it has been on hold while I have been working on `avro_derive`. I don't expect it to make it into the 0.22 release.
   
   Nice. Thanks!
   
   Shall we keep this issue open as reference?


-- 
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: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org