EmilyMatt commented on code in PR #18809:
URL: https://github.com/apache/datafusion/pull/18809#discussion_r2540937135
##########
datafusion/datasource-avro/src/avro_to_arrow/arrow_array_reader.rs:
##########
@@ -359,13 +355,15 @@ impl<R: Read> AvroArrowArrayReader<'_, R> {
let builder =
builder.as_any_mut().downcast_mut::<ListBuilder<StringDictionaryBuilder<D>>>().ok_or_else(||SchemaError(
"Cast failed for
ListBuilder<StringDictionaryBuilder> during nested data parsing".to_string(),
))?;
- for val in vals {
+ vals.into_iter().try_for_each(|val| {
if let Some(v) = val {
- let _ = builder.values().append(&v)?;
+ builder.values().append(v)?;
} else {
- builder.values().append_null()
- };
- }
+ builder.values().append_null();
+ }
+
+ Result::<_, ArrowError>::Ok(())
Review Comment:
This is perfectly valid in Rust^
You can set new generics on type aliaes
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]