Skip to content

Commit

Permalink
explain null behavior in Take doccomment
Browse files Browse the repository at this point in the history
  • Loading branch information
bkietz committed Apr 8, 2019
1 parent 14e837e commit a7dd739
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions cpp/src/arrow/compute/kernels/take.h
Expand Up @@ -42,14 +42,16 @@ struct ARROW_EXPORT TakeOptions {
} out_of_bounds = ERROR;
};

/// \brief Take from one array type to another
/// \brief Take from an array of values at indices in another array
///
/// The output array will be of the same type as the input values
/// array, with elements taken from the values array at the given
/// indices.
/// indices. If an index is null then the taken element will null.
///
/// For example given values ["a", "b", "c"] and indices
/// [2, 1], the output will be ["c", "b"].
/// For example given values = ["a", "b", "c", null, "e", "f"] and
/// indices = [2, 1, null, 3], the output will be
/// = [values[2], values[1], null, values[3]]
/// = ["c", "b", null, null]
///
/// \param[in] context the FunctionContext
/// \param[in] values array from which to take
Expand Down

0 comments on commit a7dd739

Please sign in to comment.