This is an automated email from the ASF dual-hosted git repository.

alamb pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion.git


The following commit(s) were added to refs/heads/main by this push:
     new 3542029228 Minor: Refine doc comments for 
BuiltinScalarFunction::return_dimension (#7045)
3542029228 is described below

commit 354202922889502cf51cabf630b05003fddd2ec7
Author: Andrew Lamb <[email protected]>
AuthorDate: Wed Jul 26 14:40:30 2023 -0500

    Minor: Refine doc comments for BuiltinScalarFunction::return_dimension 
(#7045)
---
 datafusion/expr/src/built_in_function.rs | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/datafusion/expr/src/built_in_function.rs 
b/datafusion/expr/src/built_in_function.rs
index 6914de686a..2cb1cf5441 100644
--- a/datafusion/expr/src/built_in_function.rs
+++ b/datafusion/expr/src/built_in_function.rs
@@ -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;

Reply via email to