adriangb commented on code in PR #25953:
URL: https://github.com/apache/datafusion/pull/25953#discussion_r4301764877
##########
datafusion/functions-nested/src/repeat.rs:
##########
@@ -297,8 +297,12 @@ fn general_list_repeat<O: OffsetSizeTrait>(
&UInt64Array::from_iter_values(take_indices),
None,
)?;
+ let inner_field = match list_array.data_type() {
+ List(field) | LargeList(field) => Arc::clone(field),
+ other => return exec_err!("array_repeat: expected a list, got
{other}"),
Review Comment:
Nit: `list_array` is always a `GenericListArray<O>`, so this arm cannot
occur. `internal_err!` tells readers (and users, if it ever fires) that this is
a bug, not bad input.
```suggestion
other => return internal_err!("array_repeat: expected a list, got
{other}"),
```
(The import must change from `exec_err` to `internal_err`.)
--
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]