Rich-T-kid commented on code in PR #12118:
URL: https://github.com/apache/arrow-rs/pull/12118#discussion_r4571217667


##########
arrow-avro/src/codec.rs:
##########
@@ -2270,19 +2273,19 @@ impl<'a> Maker<'a> {
         reader_record: &Record<'a>,
         namespace: Option<&'a str>,
     ) -> Result<AvroDataType, ArrowError> {
+        let writer_ns =
+            named_type_namespace(writer_record.name, writer_record.namespace, 
namespace);

Review Comment:
   `namespace` is the reader enclosing namespace here: nested fields recurse 
through `make_data_type(..., reader_ns)` below. That means an implicit 
namespace on the writer side is resolved as if it belonged to the reader. For 
example, if `writer_ns.B` resolves to `reader_ns.B` through an alias, a writer 
child `Bw` inherits `writer_ns`, but this code gives it `reader_ns`. A reader 
child explicitly named `writer_ns.Bw` then fails with `Record name mismatch` 
even though both child full names are `writer_ns.Bw`. I reproduced that against 
this head. Could we carry the writer and reader enclosing namespaces separately 
through resolution?



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