Skip to content

Commit

Permalink
update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
R-JunmingChen committed Sep 9, 2023
1 parent 8d2129a commit f39c118
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
5 changes: 2 additions & 3 deletions cpp/src/arrow/compute/api_vector.h
Original file line number Diff line number Diff line change
Expand Up @@ -588,9 +588,8 @@ Result<Datum> DictionaryEncode(

/// \brief Compact a dictionary array
///
/// The output removes unused values in dictionary from the input, which
/// remove unused values in dictionary.
/// The function assume every indice is effective.
/// The output removes unused values in dictionary from the input.
/// The function assumes every indice is effective.
///
/// \param[in] value array-like input, which should be a dictionary type.
/// \param[in] ctx the function execution context, optional
Expand Down
11 changes: 5 additions & 6 deletions cpp/src/arrow/compute/kernels/vector_dictionary.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ namespace {
const FunctionDoc dictionary_compact_doc{
"Compact dictionary array",
("Return a compacted version of the dictionary array input,\n"
"which would remove unused values in dictionary.\n"
"The function assume every indice is effective."),
"which removes unused values in dictionary.\n"
"The function assumes every indice is effective."),
{"dictionary_array"}};

class DictionaryCompactKernel : public KernelState {
Expand Down Expand Up @@ -152,8 +152,8 @@ class DictionaryCompactKernelImpl : public DictionaryCompactKernel {
}
};

Result<std::unique_ptr<KernelState>> DictionaryCompactInit(
KernelContext* ctx, const KernelInitArgs& args) {
Result<std::unique_ptr<KernelState>> DictionaryCompactInit(KernelContext* ctx,
const KernelInitArgs& args) {
const auto& dict_type =
checked_cast<const DictionaryType&>(*(args.inputs[0].owned_type));
switch (dict_type.index_type()->id()) {
Expand All @@ -179,8 +179,7 @@ Result<std::unique_ptr<KernelState>> DictionaryCompactInit(
}
}

Status DictionaryCompactExec(KernelContext* ctx, const ExecSpan& batch,
ExecResult* out) {
Status DictionaryCompactExec(KernelContext* ctx, const ExecSpan& batch, ExecResult* out) {
if (batch[0].is_scalar()) {
return Status::TypeError("Expected an Array or a Chunked Array");
}
Expand Down

0 comments on commit f39c118

Please sign in to comment.