bkietz commented on a change in pull request #8457:
URL: https://github.com/apache/arrow/pull/8457#discussion_r505701873



##########
File path: cpp/src/arrow/compute/kernels/vector_nested.cc
##########
@@ -65,18 +65,33 @@ Result<ValueDescr> ValuesType(KernelContext*, const 
std::vector<ValueDescr>& arg
   return ValueDescr::Array(list_type.value_type());
 }
 
+FunctionDoc list_flatten_doc(
+    "Flatten list values",
+    ("`lists` must have a list-like type.\n"
+     "Return an array with the top list level flattened.\n"
+     "Top-level null values in `lists` do not emit anything in the input."),
+    {"lists"});
+
+FunctionDoc list_parent_indices_doc(
+    "Compute parent indices of nested list values",
+    ("`lists` must have a list-like type.\n"
+     "For each value in each list of `lists`, the top-level list index\n"

Review comment:
       Going further down the docstring rabbithole: we could introduce a 
doctest-like class (of which a FunctionDoc contains a vector), which could just 
be a set of lambdas which generate a set of inputs, options, and maybe the 
expected output. These can then be rendered lazily in python




----------------------------------------------------------------
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]


Reply via email to