You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@avro.apache.org by "martin-g (via GitHub)" <gi...@apache.org> on 2023/03/10 09:16:50 UTC

[GitHub] [avro] martin-g commented on a diff in pull request #2014: AVRO-3683: [Rust] Read/Write with multiple schemas

martin-g commented on code in PR #2014:
URL: https://github.com/apache/avro/pull/2014#discussion_r1132128895


##########
lang/rust/avro/src/reader.rs:
##########
@@ -178,7 +180,13 @@ impl<R: Read> Block<R> {
 
         let mut block_bytes = &self.buf[self.buf_idx..];
         let b_original = block_bytes.len();
-        let item = from_avro_datum(&self.writer_schema, &mut block_bytes, read_schema)?;
+        let schemata = if self.schemata.is_empty() {

Review Comment:
   `self.schemata` is a `Vec<&schema>` - https://github.com/apache/avro/pull/2014/files#diff-0b204c2ac80059e0a721c5626b26ee3037f0ef202d61187f20c0ad714d7d6607R49



##########
lang/rust/avro/src/reader.rs:
##########
@@ -178,7 +180,13 @@ impl<R: Read> Block<R> {
 
         let mut block_bytes = &self.buf[self.buf_idx..];
         let b_original = block_bytes.len();
-        let item = from_avro_datum(&self.writer_schema, &mut block_bytes, read_schema)?;
+        let schemata = if self.schemata.is_empty() {

Review Comment:
   `self.schemata` is a `Vec<&Schema>` - https://github.com/apache/avro/pull/2014/files#diff-0b204c2ac80059e0a721c5626b26ee3037f0ef202d61187f20c0ad714d7d6607R49



-- 
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