alamb commented on code in PR #7008:
URL: https://github.com/apache/arrow-datafusion/pull/7008#discussion_r1269793463
##########
datafusion/physical-expr/src/array_expressions.rs:
##########
@@ -163,13 +163,20 @@ fn compute_array_length(
/// Returns the dimension of the array
fn compute_array_ndims(arr: Option<ArrayRef>) -> Result<Option<u64>> {
+ Ok(compute_array_ndims_with_datatype(arr)?.0)
+}
+
+/// Returns the dimension and lower datatype of the array
Review Comment:
```suggestion
/// Returns the dimension and the datatype of elements of the array
```
##########
datafusion/expr/src/built_in_function.rs:
##########
@@ -430,7 +430,22 @@ impl BuiltinScalarFunction {
)
}
- /// Returns the output [`DataType` of this function
+ /// Returns the dimension [`DataType`] of [`DataType::List`]
Review Comment:
```suggestion
/// Returns the dimension [`DataType`] of [`DataType::List`].
///
/// Dimension is defined as the deepest level of nesting.
/// * `Int64` has dimension 1
/// * `List(Int64)` has dimension 2
/// * `List(List(Int64))` has dimension 3
/// * etc.
```
--
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]