andygrove commented on a change in pull request #6770:
URL: https://github.com/apache/arrow/pull/6770#discussion_r413404215
##########
File path: rust/datafusion/src/utils.rs
##########
@@ -74,6 +74,29 @@ macro_rules! make_string {
}};
}
+macro_rules! make_string_from_list {
+ ($column: ident, $row: ident) => {{
+ let list = $column
+ .as_any()
+ .downcast_ref::<array::ListArray>()
+ .unwrap()
+ .value($row);
+ let string_values = match (0..list.len())
+ .map(|i| array_value_to_string(list.clone(), i))
+ .collect::<Result<Vec<String>>>()
+ {
+ Ok(values) => values,
+ _ => {
+ return Err(ExecutionError::ExecutionError(format!(
+ "Unsupported {:?} type for repl.",
Review comment:
What does `repl` mean here? Maybe this error could be a bit more
descriptive?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]