Skip to content

Commit

Permalink
Minor: Refine doc comments for BuiltinScalarFunction::return_dimension (
Browse files Browse the repository at this point in the history
  • Loading branch information
alamb authored Jul 26, 2023
1 parent f9a1396 commit 3542029
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion datafusion/expr/src/built_in_function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,15 @@ impl BuiltinScalarFunction {
)
}

/// Returns the dimension [`DataType`] of [`DataType::List`].
/// Returns the dimension [`DataType`] of [`DataType::List`] if
/// treated as a N-dimensional array.
///
/// ## Examples:
///
/// * `Int64` has dimension 1
/// * `List(Int64)` has dimension 2
/// * `List(List(Int64))` has dimension 3
/// * etc.
fn return_dimension(self, input_expr_type: DataType) -> u64 {
let mut res: u64 = 1;
let mut current_data_type = input_expr_type;
Expand Down

0 comments on commit 3542029

Please sign in to comment.