compiler-segfault commented on code in PR #12118:
URL: https://github.com/apache/arrow-rs/pull/12118#discussion_r4571664170
##########
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:
Fixed in 8f6606da: `make_data_type`, `resolve_type` and the per-type
resolvers now take the writer and reader enclosing namespaces separately, and
`resolve_records` passes `writer_ns` for the writer side and `reader_ns` for
the reader side when it recurses into a field pair. The same split applies to
`fixed`, `enum`, `array` and `map` children and to union branches.
Added `test_resolve_nested_record_with_writer_namespace_through_alias`,
which is your scenario: the reader aliases `writer_ns.B` to `reader_ns.B` and
the nested reader record is spelled `writer_ns.Bw`. It fails on the previous
head with `Record name mismatch writer=Bw, reader=Bw` and passes now. `cargo
test -p arrow-avro codec::` is 53/53 and `cargo clippy -p arrow-avro
--all-targets -- -D warnings` is clean.
--
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]