jecsand838 commented on code in PR #8349:
URL: https://github.com/apache/arrow-rs/pull/8349#discussion_r2365857259


##########
arrow-avro/src/reader/record.rs:
##########
@@ -214,6 +254,148 @@ struct EnumResolution {
     default_index: i32,
 }
 
+#[derive(Debug, Clone, Copy)]
+enum BranchDispatch {
+    NoMatch,
+    ToReader {
+        reader_idx: usize,
+        promotion: Promotion,
+    },
+}
+
+#[derive(Debug)]
+struct UnionResolution {
+    dispatch: Option<Arc<[BranchDispatch]>>,
+    kind: UnionResolvedKind,
+}
+
+#[derive(Debug)]
+enum UnionResolvedKind {
+    Both {
+        reader_type_codes: Arc<[i8]>,
+    },
+    ToSingle {
+        target: Box<Decoder>,

Review Comment:
   That's correct, there's the possibility of infinite type recursion with 
`Decoder`. I was planning to come back and attempt to remove the need for 
`Box`, but that would also impact `Array`, `Map`, and `Nullable`.



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