Ted-Jiang commented on a change in pull request #1205:
URL: https://github.com/apache/arrow-rs/pull/1205#discussion_r787847666
##########
File path: arrow/src/json/writer.rs
##########
@@ -178,31 +178,29 @@ pub fn array_to_json_array(array: &ArrayRef) ->
Vec<Value> {
DataType::UInt64 => primitive_array_to_json::<UInt64Type>(array),
DataType::Float32 => primitive_array_to_json::<Float32Type>(array),
DataType::Float64 => primitive_array_to_json::<Float64Type>(array),
- DataType::List(_) => as_list_array(array)
+ DataType::List(_) => Ok(as_list_array(array)
.iter()
.map(|maybe_value| match maybe_value {
- Some(v) => Value::Array(array_to_json_array(&v)),
+ Some(v) => Value::Array(array_to_json_array(&v).unwrap()),
Review comment:
Thanks ! @jhorstmann this really helps me!
I have a little doubt about `Ok(Value::Array(array_to_json_array(&v)?))`
if ? return a `Err` then it will be `Ok(Err)`, is there some info i lost (i
am a Rust newbie 😂)
--
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]