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

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


The following commit(s) were added to refs/heads/main by this push:
     new ccc674c56f GH-38964: [C++] Fix spelling (compute) (#38965)
ccc674c56f is described below

commit ccc674c56f3473c9556a5af96dff9d156f559663
Author: Josh Soref <[email protected]>
AuthorDate: Thu Jan 4 12:57:25 2024 -0500

    GH-38964: [C++] Fix spelling (compute) (#38965)
    
    
    
    ### Rationale for this change
    
    ### What changes are included in this PR?
    
    Spelling fixes to cpp/src/arrow/compute/
    
    ### Are these changes tested?
    
    ### Are there any user-facing changes?
    
    * Closes: #38964
    
    Authored-by: Josh Soref <[email protected]>
    Signed-off-by: Felipe Oliveira Carvalho <[email protected]>
---
 cpp/src/arrow/compute/api_aggregate.h              |  2 +-
 cpp/src/arrow/compute/api_scalar.h                 |  4 +--
 cpp/src/arrow/compute/api_vector.h                 |  6 ++--
 cpp/src/arrow/compute/exec.cc                      |  2 +-
 cpp/src/arrow/compute/exec_internal.h              |  2 +-
 cpp/src/arrow/compute/exec_test.cc                 |  2 +-
 cpp/src/arrow/compute/kernels/aggregate_basic.cc   |  2 +-
 .../compute/kernels/aggregate_basic_internal.h     |  2 +-
 cpp/src/arrow/compute/kernels/aggregate_mode.cc    |  2 +-
 .../arrow/compute/kernels/aggregate_quantile.cc    |  2 +-
 cpp/src/arrow/compute/kernels/aggregate_test.cc    |  4 +--
 cpp/src/arrow/compute/kernels/hash_aggregate.cc    |  4 +--
 .../compute/kernels/scalar_arithmetic_benchmark.cc |  2 +-
 .../compute/kernels/scalar_arithmetic_test.cc      |  2 +-
 cpp/src/arrow/compute/kernels/scalar_cast_test.cc  |  8 +++---
 .../arrow/compute/kernels/scalar_if_else_test.cc   |  2 +-
 cpp/src/arrow/compute/kernels/scalar_round.cc      |  2 +-
 .../arrow/compute/kernels/scalar_string_internal.h |  2 +-
 .../arrow/compute/kernels/scalar_string_test.cc    |  4 +--
 .../arrow/compute/kernels/scalar_temporal_test.cc  | 14 +++++-----
 .../arrow/compute/kernels/vector_run_end_encode.cc | 12 ++++----
 cpp/src/arrow/compute/kernels/vector_select_k.cc   | 32 +++++++++++-----------
 .../arrow/compute/kernels/vector_selection_test.cc |  2 +-
 cpp/src/arrow/compute/key_map.cc                   |  4 +--
 cpp/src/arrow/compute/key_map.h                    |  4 +--
 cpp/src/arrow/compute/key_map_avx2.cc              |  2 +-
 cpp/src/arrow/compute/light_array.cc               |  2 +-
 cpp/src/arrow/compute/light_array_test.cc          |  2 +-
 cpp/src/arrow/compute/ordering.h                   |  2 +-
 cpp/src/arrow/compute/registry_test.cc             |  2 +-
 cpp/src/arrow/compute/row/grouper.cc               |  2 +-
 cpp/src/arrow/compute/row/grouper.h                | 10 +++----
 32 files changed, 73 insertions(+), 73 deletions(-)

diff --git a/cpp/src/arrow/compute/api_aggregate.h 
b/cpp/src/arrow/compute/api_aggregate.h
index 4d2c814a69..2e5210b073 100644
--- a/cpp/src/arrow/compute/api_aggregate.h
+++ b/cpp/src/arrow/compute/api_aggregate.h
@@ -452,7 +452,7 @@ Result<Datum> TDigest(const Datum& value,
 /// \brief Find the first index of a value in an array.
 ///
 /// \param[in] value The array to search.
-/// \param[in] options The array to search for. See IndexOoptions.
+/// \param[in] options The array to search for. See IndexOptions.
 /// \param[in] ctx the function execution context, optional
 /// \return out a Scalar containing the index (or -1 if not found).
 ///
diff --git a/cpp/src/arrow/compute/api_scalar.h 
b/cpp/src/arrow/compute/api_scalar.h
index 26fbe64f74..bad34f4a37 100644
--- a/cpp/src/arrow/compute/api_scalar.h
+++ b/cpp/src/arrow/compute/api_scalar.h
@@ -491,7 +491,7 @@ struct ARROW_EXPORT AssumeTimezoneOptions : public 
FunctionOptions {
 
   /// How to interpret ambiguous local times (due to DST shifts)
   Ambiguous ambiguous;
-  /// How to interpret non-existent local times (due to DST shifts)
+  /// How to interpret nonexistent local times (due to DST shifts)
   Nonexistent nonexistent;
 };
 
@@ -1589,7 +1589,7 @@ ARROW_EXPORT Result<Datum> MonthsBetween(const Datum& 
left, const Datum& right,
 ARROW_EXPORT Result<Datum> WeeksBetween(const Datum& left, const Datum& right,
                                         ExecContext* ctx = NULLPTR);
 
-/// \brief Month Day Nano Between finds the number of months, days, and 
nonaseconds
+/// \brief Month Day Nano Between finds the number of months, days, and 
nanoseconds
 /// between two values
 ///
 /// \param[in] left input treated as the start time
diff --git a/cpp/src/arrow/compute/api_vector.h 
b/cpp/src/arrow/compute/api_vector.h
index 759f9e5c1a..919572f16e 100644
--- a/cpp/src/arrow/compute/api_vector.h
+++ b/cpp/src/arrow/compute/api_vector.h
@@ -401,7 +401,7 @@ Result<std::shared_ptr<Array>> NthToIndices(const Array& 
values, int64_t n,
 
 /// \brief Return indices that partition an array around n-th sorted element.
 ///
-/// This overload takes a PartitionNthOptions specifiying the pivot index
+/// This overload takes a PartitionNthOptions specifying the pivot index
 /// and the null handling.
 ///
 /// \param[in] values array to be partitioned
@@ -452,7 +452,7 @@ Result<std::shared_ptr<Array>> SortIndices(const Array& 
array,
 
 /// \brief Return the indices that would sort an array.
 ///
-/// This overload takes a ArraySortOptions specifiying the sort order
+/// This overload takes a ArraySortOptions specifying the sort order
 /// and the null handling.
 ///
 /// \param[in] array array to sort
@@ -486,7 +486,7 @@ Result<std::shared_ptr<Array>> SortIndices(const 
ChunkedArray& chunked_array,
 
 /// \brief Return the indices that would sort a chunked array.
 ///
-/// This overload takes a ArraySortOptions specifiying the sort order
+/// This overload takes a ArraySortOptions specifying the sort order
 /// and the null handling.
 ///
 /// \param[in] chunked_array chunked array to sort
diff --git a/cpp/src/arrow/compute/exec.cc b/cpp/src/arrow/compute/exec.cc
index c18dfa0952..28dcf493fa 100644
--- a/cpp/src/arrow/compute/exec.cc
+++ b/cpp/src/arrow/compute/exec.cc
@@ -1164,7 +1164,7 @@ class ScalarAggExecutor : public 
KernelExecutorImpl<ScalarAggregateKernel> {
     // TODO(wesm): this is odd and should be examined soon -- only one state
     // "should" be needed per thread of execution
 
-    // FIXME(ARROW-11840) don't merge *any* aggegates for every batch
+    // FIXME(ARROW-11840) don't merge *any* aggregates for every batch
     ARROW_ASSIGN_OR_RAISE(auto batch_state,
                           kernel_->init(kernel_ctx_, {kernel_, *input_types_, 
options_}));
 
diff --git a/cpp/src/arrow/compute/exec_internal.h 
b/cpp/src/arrow/compute/exec_internal.h
index 8beff2a6c6..7e4f364a92 100644
--- a/cpp/src/arrow/compute/exec_internal.h
+++ b/cpp/src/arrow/compute/exec_internal.h
@@ -46,7 +46,7 @@ class ARROW_EXPORT ExecSpanIterator {
  public:
   ExecSpanIterator() = default;
 
-  /// \brief Initialize itertor iterator and do basic argument validation
+  /// \brief Initialize iterator and do basic argument validation
   ///
   /// \param[in] batch the input ExecBatch
   /// \param[in] max_chunksize the maximum length of each ExecSpan. Depending
diff --git a/cpp/src/arrow/compute/exec_test.cc 
b/cpp/src/arrow/compute/exec_test.cc
index d661e5735f..cfce0c57fa 100644
--- a/cpp/src/arrow/compute/exec_test.cc
+++ b/cpp/src/arrow/compute/exec_test.cc
@@ -1232,7 +1232,7 @@ void 
TestCallScalarFunctionPreallocationCases::DoTest(FunctionCallerMaker caller
     }
 
     // Set the exec_chunksize to be smaller, so now we have several invocations
-    // of the kernel, but still the output is onee array
+    // of the kernel, but still the output is one array
     {
       std::vector<Datum> args = {Datum(arr)};
       exec_ctx_->set_exec_chunksize(80);
diff --git a/cpp/src/arrow/compute/kernels/aggregate_basic.cc 
b/cpp/src/arrow/compute/kernels/aggregate_basic.cc
index ddd2416524..1fbcd6a249 100644
--- a/cpp/src/arrow/compute/kernels/aggregate_basic.cc
+++ b/cpp/src/arrow/compute/kernels/aggregate_basic.cc
@@ -1100,7 +1100,7 @@ void RegisterScalarAggregateBasic(FunctionRegistry* 
registry) {
   AddFirstLastKernels(FirstLastInit, TemporalTypes(), func.get());
   DCHECK_OK(registry->AddFunction(std::move(func)));
 
-  // Add first/last as convience functions
+  // Add first/last as convenience functions
   func = std::make_shared<ScalarAggregateFunction>("first", Arity::Unary(), 
first_doc,
                                                    
&default_scalar_aggregate_options);
   AddFirstOrLastAggKernel<FirstOrLast::First>(func.get(), first_last_func);
diff --git a/cpp/src/arrow/compute/kernels/aggregate_basic_internal.h 
b/cpp/src/arrow/compute/kernels/aggregate_basic_internal.h
index 4966e9871d..f08e7aaa53 100644
--- a/cpp/src/arrow/compute/kernels/aggregate_basic_internal.h
+++ b/cpp/src/arrow/compute/kernels/aggregate_basic_internal.h
@@ -472,7 +472,7 @@ struct FirstLastImpl : public ScalarAggregator {
     this->count += arr.length() - null_count;
 
     if (null_count == 0) {
-      // If there are no null valus, we can just merge
+      // If there are no null values, we can just merge
       // the first and last element
       this->state.MergeOne(arr.GetView(0));
       this->state.MergeOne(arr.GetView(arr.length() - 1));
diff --git a/cpp/src/arrow/compute/kernels/aggregate_mode.cc 
b/cpp/src/arrow/compute/kernels/aggregate_mode.cc
index 7f359ead6c..3f84c0a5ee 100644
--- a/cpp/src/arrow/compute/kernels/aggregate_mode.cc
+++ b/cpp/src/arrow/compute/kernels/aggregate_mode.cc
@@ -115,7 +115,7 @@ Status Finalize(KernelContext* ctx, const DataType& type, 
ExecResult* out,
   return Status::OK();
 }
 
-// count value occurances for integers with narrow value range
+// count value occurrences for integers with narrow value range
 // O(1) space, O(n) time
 template <typename T>
 struct CountModer {
diff --git a/cpp/src/arrow/compute/kernels/aggregate_quantile.cc 
b/cpp/src/arrow/compute/kernels/aggregate_quantile.cc
index e675a1cec8..f4826229dd 100644
--- a/cpp/src/arrow/compute/kernels/aggregate_quantile.cc
+++ b/cpp/src/arrow/compute/kernels/aggregate_quantile.cc
@@ -120,7 +120,7 @@ struct SortQuantiler {
                 });
 
       // input array is partitioned around data point at `last_index` (pivot)
-      // for next quatile which is smaller, we only consider inputs left of 
the pivot
+      // for next quantile which is smaller, we only consider inputs left of 
the pivot
       uint64_t last_index = in_buffer.size();
       if (is_datapoint) {
         CType* out_buffer = out_data->template GetMutableValues<CType>(1);
diff --git a/cpp/src/arrow/compute/kernels/aggregate_test.cc 
b/cpp/src/arrow/compute/kernels/aggregate_test.cc
index aa19fb3401..65439af274 100644
--- a/cpp/src/arrow/compute/kernels/aggregate_test.cc
+++ b/cpp/src/arrow/compute/kernels/aggregate_test.cc
@@ -478,7 +478,7 @@ TEST_F(TestSumKernelRoundOff, Basics) {
 
   // array = np.arange(321000, dtype='float64')
   // array -= np.mean(array)
-  // array *= arrray
+  // array *= array
   double index = 0;
   ASSERT_OK_AND_ASSIGN(
       auto array, ArrayFromBuilderVisitor(
@@ -3653,7 +3653,7 @@ class TestPrimitiveQuantileKernel : public 
::testing::Test {
 
 #define INTYPE(x) Datum(static_cast<typename TypeParam::c_type>(x))
 #define DOUBLE(x) Datum(static_cast<double>(x))
-// output type per interplation: linear, lower, higher, nearest, midpoint
+// output type per interpolation: linear, lower, higher, nearest, midpoint
 #define O(a, b, c, d, e) \
   { DOUBLE(a), INTYPE(b), INTYPE(c), INTYPE(d), DOUBLE(e) }
 
diff --git a/cpp/src/arrow/compute/kernels/hash_aggregate.cc 
b/cpp/src/arrow/compute/kernels/hash_aggregate.cc
index 47cae538e2..c37e45513d 100644
--- a/cpp/src/arrow/compute/kernels/hash_aggregate.cc
+++ b/cpp/src/arrow/compute/kernels/hash_aggregate.cc
@@ -1848,8 +1848,8 @@ struct GroupedFirstLastImpl final : public 
GroupedAggregator {
                const ArrayData& group_id_mapping) override {
     // The merge is asymmetric. "first" from this state gets pick over "first" 
from other
     // state. "last" from other state gets pick over from this state. This is 
so that when
-    // using with segmeneted aggregation, we still get the correct "first" and 
"last"
-    // value for the entire segement.
+    // using with segmented aggregation, we still get the correct "first" and 
"last"
+    // value for the entire segment.
     auto other = checked_cast<GroupedFirstLastImpl*>(&raw_other);
 
     auto raw_firsts = firsts_.mutable_data();
diff --git a/cpp/src/arrow/compute/kernels/scalar_arithmetic_benchmark.cc 
b/cpp/src/arrow/compute/kernels/scalar_arithmetic_benchmark.cc
index 4b678da5f1..17e9951d69 100644
--- a/cpp/src/arrow/compute/kernels/scalar_arithmetic_benchmark.cc
+++ b/cpp/src/arrow/compute/kernels/scalar_arithmetic_benchmark.cc
@@ -33,7 +33,7 @@ constexpr auto kSeed = 0x94378165;
 using BinaryOp = Result<Datum>(const Datum&, const Datum&, ArithmeticOptions,
                                ExecContext*);
 
-// Add explicit overflow-checked shortcuts, for easy benchmark parametering.
+// Add explicit overflow-checked shortcuts, for easy benchmark parameterizing.
 static Result<Datum> AddChecked(const Datum& left, const Datum& right,
                                 ArithmeticOptions options = 
ArithmeticOptions(),
                                 ExecContext* ctx = NULLPTR) {
diff --git a/cpp/src/arrow/compute/kernels/scalar_arithmetic_test.cc 
b/cpp/src/arrow/compute/kernels/scalar_arithmetic_test.cc
index 756b3028c4..37a1bcbc02 100644
--- a/cpp/src/arrow/compute/kernels/scalar_arithmetic_test.cc
+++ b/cpp/src/arrow/compute/kernels/scalar_arithmetic_test.cc
@@ -1857,7 +1857,7 @@ TEST_F(TestBinaryArithmeticDecimal, DispatchBest) {
   }
 }
 
-// reference result from bc (precsion=100, scale=40)
+// reference result from bc (precision=100, scale=40)
 TEST_F(TestBinaryArithmeticDecimal, AddSubtract) {
   // array array, decimal128
   {
diff --git a/cpp/src/arrow/compute/kernels/scalar_cast_test.cc 
b/cpp/src/arrow/compute/kernels/scalar_cast_test.cc
index b429c8175b..a8acf68f66 100644
--- a/cpp/src/arrow/compute/kernels/scalar_cast_test.cc
+++ b/cpp/src/arrow/compute/kernels/scalar_cast_test.cc
@@ -2842,19 +2842,19 @@ TEST(Cast, StructToDifferentNullabilityStruct) {
         ::testing::HasSubstr("cannot cast nullable field to non-nullable 
field"),
         Cast(src_nullable, options1_non_nullable));
 
-    std::vector<std::shared_ptr<Field>> fields_dest2_non_nullble = {
+    std::vector<std::shared_ptr<Field>> fields_dest2_non_nullable = {
         std::make_shared<Field>("a", int64(), false),
         std::make_shared<Field>("c", int64(), false)};
-    const auto dest2_non_nullable = arrow::struct_(fields_dest2_non_nullble);
+    const auto dest2_non_nullable = arrow::struct_(fields_dest2_non_nullable);
     const auto options2_non_nullable = CastOptions::Safe(dest2_non_nullable);
     EXPECT_RAISES_WITH_MESSAGE_THAT(
         TypeError,
         ::testing::HasSubstr("cannot cast nullable field to non-nullable 
field"),
         Cast(src_nullable, options2_non_nullable));
 
-    std::vector<std::shared_ptr<Field>> fields_dest3_non_nullble = {
+    std::vector<std::shared_ptr<Field>> fields_dest3_non_nullable = {
         std::make_shared<Field>("c", int64(), false)};
-    const auto dest3_non_nullable = arrow::struct_(fields_dest3_non_nullble);
+    const auto dest3_non_nullable = arrow::struct_(fields_dest3_non_nullable);
     const auto options3_non_nullable = CastOptions::Safe(dest3_non_nullable);
     EXPECT_RAISES_WITH_MESSAGE_THAT(
         TypeError,
diff --git a/cpp/src/arrow/compute/kernels/scalar_if_else_test.cc 
b/cpp/src/arrow/compute/kernels/scalar_if_else_test.cc
index 771261cac9..c4c46b5efe 100644
--- a/cpp/src/arrow/compute/kernels/scalar_if_else_test.cc
+++ b/cpp/src/arrow/compute/kernels/scalar_if_else_test.cc
@@ -69,7 +69,7 @@ template <typename Type>
 class TestIfElsePrimitive : public ::testing::Test {};
 
 // There are a lot of tests here if we cover all the types and it gets slow on 
valgrind
-// so we overrdie the standard type sets with a smaller range
+// so we override the standard type sets with a smaller range
 #ifdef ARROW_VALGRIND
 using IfElseNumericBasedTypes =
     ::testing::Types<UInt32Type, FloatType, Date32Type, Time32Type, 
TimestampType,
diff --git a/cpp/src/arrow/compute/kernels/scalar_round.cc 
b/cpp/src/arrow/compute/kernels/scalar_round.cc
index 36e59c8c1d..98ebc8422c 100644
--- a/cpp/src/arrow/compute/kernels/scalar_round.cc
+++ b/cpp/src/arrow/compute/kernels/scalar_round.cc
@@ -747,7 +747,7 @@ struct Round {
       } else {
         round_val = RoundImpl<CType, RndMode>::Round(round_val);
       }
-      // Equality check is ommitted so that the common case of 10^0 (integer 
rounding)
+      // Equality check is omitted so that the common case of 10^0 (integer 
rounding)
       // uses multiply-only
       round_val = ndigits > 0 ? (round_val / pow10) : (round_val * pow10);
       if (!std::isfinite(round_val)) {
diff --git a/cpp/src/arrow/compute/kernels/scalar_string_internal.h 
b/cpp/src/arrow/compute/kernels/scalar_string_internal.h
index 1a99694416..7a5d5a7c86 100644
--- a/cpp/src/arrow/compute/kernels/scalar_string_internal.h
+++ b/cpp/src/arrow/compute/kernels/scalar_string_internal.h
@@ -306,7 +306,7 @@ struct StringSplitExec {
   using ListOffsetsBuilderType = TypedBufferBuilder<list_offset_type>;
   using State = OptionsWrapper<Options>;
 
-  // Keep the temporary storage accross individual values, to minimize 
reallocations
+  // Keep the temporary storage across individual values, to minimize 
reallocations
   std::vector<std::string_view> parts;
   Options options;
 
diff --git a/cpp/src/arrow/compute/kernels/scalar_string_test.cc 
b/cpp/src/arrow/compute/kernels/scalar_string_test.cc
index ff14f5e7a5..5dec16d89e 100644
--- a/cpp/src/arrow/compute/kernels/scalar_string_test.cc
+++ b/cpp/src/arrow/compute/kernels/scalar_string_test.cc
@@ -2060,7 +2060,7 @@ TYPED_TEST(TestStringKernels, SliceCodeunitsBasic) {
   this->CheckUnary("utf8_slice_codeunits", R"(["𝑓öõḍš"])", this->type(), 
R"([""])",
                    &options_edgecase_1);
 
-  // this is a safeguard agains an optimization path possible, but actually a 
tricky case
+  // this is a safeguard against an optimization path possible, but actually a 
tricky case
   SliceOptions options_edgecase_2{-6, -2};
   this->CheckUnary("utf8_slice_codeunits", R"(["𝑓öõḍš"])", this->type(), 
R"(["𝑓öõ"])",
                    &options_edgecase_2);
@@ -2189,7 +2189,7 @@ TYPED_TEST(TestBinaryKernels, SliceBytesBasic) {
                    "ds\"]",
                    this->type(), R"([""])", &options_edgecase_1);
 
-  // this is a safeguard agains an optimization path possible, but actually a 
tricky case
+  // this is a safeguard against an optimization path possible, but actually a 
tricky case
   SliceOptions options_edgecase_2{-6, -2};
   this->CheckUnary("binary_slice",
                    "[\"f\xc2\xa2"
diff --git a/cpp/src/arrow/compute/kernels/scalar_temporal_test.cc 
b/cpp/src/arrow/compute/kernels/scalar_temporal_test.cc
index d8bbe5ca8a..d448233428 100644
--- a/cpp/src/arrow/compute/kernels/scalar_temporal_test.cc
+++ b/cpp/src/arrow/compute/kernels/scalar_temporal_test.cc
@@ -2101,9 +2101,9 @@ TEST_F(ScalarTemporalTest, StrftimeNoTimezone) {
 
 TEST_F(ScalarTemporalTest, StrftimeInvalidTimezone) {
   const char* seconds = R"(["1970-01-01T00:00:59", null])";
-  auto arr = ArrayFromJSON(timestamp(TimeUnit::SECOND, "non-existent"), 
seconds);
+  auto arr = ArrayFromJSON(timestamp(TimeUnit::SECOND, "nonexistent"), 
seconds);
   EXPECT_RAISES_WITH_MESSAGE_THAT(
-      Invalid, testing::HasSubstr("Cannot locate timezone 'non-existent'"),
+      Invalid, testing::HasSubstr("Cannot locate timezone 'nonexistent'"),
       Strftime(arr, StrftimeOptions()));
 }
 
@@ -2159,12 +2159,12 @@ TEST_F(ScalarTemporalTest, StrftimeOtherLocale) {
 }
 
 TEST_F(ScalarTemporalTest, StrftimeInvalidLocale) {
-  auto options = StrftimeOptions("%d %B %Y %H:%M:%S", "non-existent");
+  auto options = StrftimeOptions("%d %B %Y %H:%M:%S", "nonexistent");
   const char* seconds = R"(["1970-01-01T00:00:59", null])";
   auto arr = ArrayFromJSON(timestamp(TimeUnit::SECOND, "UTC"), seconds);
 
   EXPECT_RAISES_WITH_MESSAGE_THAT(Invalid,
-                                  testing::HasSubstr("Cannot find locale 
'non-existent'"),
+                                  testing::HasSubstr("Cannot find locale 
'nonexistent'"),
                                   Strftime(arr, options));
 }
 
@@ -2601,7 +2601,7 @@ TEST_F(ScalarTemporalTestStrictCeil, 
TestCeilTemporalStrictCeil) {
 TEST_F(ScalarTemporalTestMultipleSinceGreaterUnit, CeilUTC) {
   std::string op = "ceil_temporal";
 
-  // Data for tests below was generaed via lubridate with the exception
+  // Data for tests below was generated via lubridate with the exception
   // of week data because lubridate currently does not support rounding to
   // multiple of week.
   const char* ceil_15_nanosecond =
@@ -2989,7 +2989,7 @@ TEST_F(ScalarTemporalTest, TestFloorTemporal) {
 TEST_F(ScalarTemporalTestMultipleSinceGreaterUnit, FloorUTC) {
   std::string op = "floor_temporal";
 
-  // Data for tests below was generaed via lubridate with the exception
+  // Data for tests below was generated via lubridate with the exception
   // of week data because lubridate currently does not support rounding to
   // multiple of week.
   const char* floor_15_nanosecond =
@@ -3402,7 +3402,7 @@ TEST_F(ScalarTemporalTest, 
TestCeilFloorRoundTemporalBrussels) {
 TEST_F(ScalarTemporalTestMultipleSinceGreaterUnit, RoundUTC) {
   std::string op = "round_temporal";
 
-  // Data for tests below was generaed via lubridate with the exception
+  // Data for tests below was generated via lubridate with the exception
   // of week data because lubridate currently does not support rounding to
   // multiple of week.
   const char* round_15_nanosecond =
diff --git a/cpp/src/arrow/compute/kernels/vector_run_end_encode.cc 
b/cpp/src/arrow/compute/kernels/vector_run_end_encode.cc
index 943fdcd6b1..811ed23e11 100644
--- a/cpp/src/arrow/compute/kernels/vector_run_end_encode.cc
+++ b/cpp/src/arrow/compute/kernels/vector_run_end_encode.cc
@@ -30,11 +30,11 @@ namespace compute {
 namespace internal {
 namespace {
 
-struct RunEndEncondingState : public KernelState {
-  explicit RunEndEncondingState(std::shared_ptr<DataType> run_end_type)
+struct RunEndEncodingState : public KernelState {
+  explicit RunEndEncodingState(std::shared_ptr<DataType> run_end_type)
       : run_end_type{std::move(run_end_type)} {}
 
-  ~RunEndEncondingState() override = default;
+  ~RunEndEncodingState() override = default;
 
   std::shared_ptr<DataType> run_end_type;
 };
@@ -273,7 +273,7 @@ struct RunEndEncodeExec {
 
   template <typename ValueType>
   static Status Exec(KernelContext* ctx, const ExecSpan& span, ExecResult* 
result) {
-    auto state = checked_cast<const RunEndEncondingState*>(ctx->state());
+    auto state = checked_cast<const RunEndEncodingState*>(ctx->state());
     switch (state->run_end_type->id()) {
       case Type::INT16:
         return DoExec<Int16Type, ValueType>(ctx, span, result);
@@ -290,7 +290,7 @@ struct RunEndEncodeExec {
   /// \brief The OutputType::Resolver of the "run_end_decode" function.
   static Result<TypeHolder> ResolveOutputType(
       KernelContext* ctx, const std::vector<TypeHolder>& input_types) {
-    auto state = checked_cast<const RunEndEncondingState*>(ctx->state());
+    auto state = checked_cast<const RunEndEncodingState*>(ctx->state());
     return TypeHolder(std::make_shared<RunEndEncodedType>(state->run_end_type,
                                                           
input_types[0].GetSharedPtr()));
   }
@@ -301,7 +301,7 @@ Result<std::unique_ptr<KernelState>> 
RunEndEncodeInit(KernelContext*,
   auto* options = checked_cast<const RunEndEncodeOptions*>(args.options);
   auto run_end_type =
       options ? options->run_end_type : 
RunEndEncodeOptions::Defaults().run_end_type;
-  return std::make_unique<RunEndEncondingState>(std::move(run_end_type));
+  return std::make_unique<RunEndEncodingState>(std::move(run_end_type));
 }
 
 template <typename RunEndType, typename ValueType, bool has_validity_buffer>
diff --git a/cpp/src/arrow/compute/kernels/vector_select_k.cc 
b/cpp/src/arrow/compute/kernels/vector_select_k.cc
index 1740a9b7f0..97996e6d52 100644
--- a/cpp/src/arrow/compute/kernels/vector_select_k.cc
+++ b/cpp/src/arrow/compute/kernels/vector_select_k.cc
@@ -72,9 +72,9 @@ class SelectKComparator<SortOrder::Descending> {
   }
 };
 
-class ArraySelecter : public TypeVisitor {
+class ArraySelector : public TypeVisitor {
  public:
-  ArraySelecter(ExecContext* ctx, const Array& array, const SelectKOptions& 
options,
+  ArraySelector(ExecContext* ctx, const Array& array, const SelectKOptions& 
options,
                 Datum* output)
       : TypeVisitor(),
         ctx_(ctx),
@@ -164,9 +164,9 @@ struct TypedHeapItem {
   ArrayType* array;
 };
 
-class ChunkedArraySelecter : public TypeVisitor {
+class ChunkedArraySelector : public TypeVisitor {
  public:
-  ChunkedArraySelecter(ExecContext* ctx, const ChunkedArray& chunked_array,
+  ChunkedArraySelector(ExecContext* ctx, const ChunkedArray& chunked_array,
                        const SelectKOptions& options, Datum* output)
       : TypeVisitor(),
         chunked_array_(chunked_array),
@@ -273,13 +273,13 @@ class ChunkedArraySelecter : public TypeVisitor {
   Datum* output_;
 };
 
-class RecordBatchSelecter : public TypeVisitor {
+class RecordBatchSelector : public TypeVisitor {
  private:
   using ResolvedSortKey = ResolvedRecordBatchSortKey;
   using Comparator = MultipleKeyComparator<ResolvedSortKey>;
 
  public:
-  RecordBatchSelecter(ExecContext* ctx, const RecordBatch& record_batch,
+  RecordBatchSelector(ExecContext* ctx, const RecordBatch& record_batch,
                       const SelectKOptions& options, Datum* output)
       : TypeVisitor(),
         ctx_(ctx),
@@ -391,7 +391,7 @@ class RecordBatchSelecter : public TypeVisitor {
   Comparator comparator_;
 };
 
-class TableSelecter : public TypeVisitor {
+class TableSelector : public TypeVisitor {
  private:
   struct ResolvedSortKey {
     ResolvedSortKey(const std::shared_ptr<ChunkedArray>& chunked_array,
@@ -420,7 +420,7 @@ class TableSelecter : public TypeVisitor {
   using Comparator = MultipleKeyComparator<ResolvedSortKey>;
 
  public:
-  TableSelecter(ExecContext* ctx, const Table& table, const SelectKOptions& 
options,
+  TableSelector(ExecContext* ctx, const Table& table, const SelectKOptions& 
options,
                 Datum* output)
       : TypeVisitor(),
         ctx_(ctx),
@@ -610,32 +610,32 @@ class SelectKUnstableMetaFunction : public MetaFunction {
   Result<Datum> SelectKth(const Array& array, const SelectKOptions& options,
                           ExecContext* ctx) const {
     Datum output;
-    ArraySelecter selecter(ctx, array, options, &output);
-    ARROW_RETURN_NOT_OK(selecter.Run());
+    ArraySelector selector(ctx, array, options, &output);
+    ARROW_RETURN_NOT_OK(selector.Run());
     return output;
   }
 
   Result<Datum> SelectKth(const ChunkedArray& chunked_array,
                           const SelectKOptions& options, ExecContext* ctx) 
const {
     Datum output;
-    ChunkedArraySelecter selecter(ctx, chunked_array, options, &output);
-    ARROW_RETURN_NOT_OK(selecter.Run());
+    ChunkedArraySelector selector(ctx, chunked_array, options, &output);
+    ARROW_RETURN_NOT_OK(selector.Run());
     return output;
   }
   Result<Datum> SelectKth(const RecordBatch& record_batch, const 
SelectKOptions& options,
                           ExecContext* ctx) const {
     ARROW_RETURN_NOT_OK(CheckConsistency(*record_batch.schema(), 
options.sort_keys));
     Datum output;
-    RecordBatchSelecter selecter(ctx, record_batch, options, &output);
-    ARROW_RETURN_NOT_OK(selecter.Run());
+    RecordBatchSelector selector(ctx, record_batch, options, &output);
+    ARROW_RETURN_NOT_OK(selector.Run());
     return output;
   }
   Result<Datum> SelectKth(const Table& table, const SelectKOptions& options,
                           ExecContext* ctx) const {
     ARROW_RETURN_NOT_OK(CheckConsistency(*table.schema(), options.sort_keys));
     Datum output;
-    TableSelecter selecter(ctx, table, options, &output);
-    ARROW_RETURN_NOT_OK(selecter.Run());
+    TableSelector selector(ctx, table, options, &output);
+    ARROW_RETURN_NOT_OK(selector.Run());
     return output;
   }
 };
diff --git a/cpp/src/arrow/compute/kernels/vector_selection_test.cc 
b/cpp/src/arrow/compute/kernels/vector_selection_test.cc
index 30e85c1f71..bdf9f5454f 100644
--- a/cpp/src/arrow/compute/kernels/vector_selection_test.cc
+++ b/cpp/src/arrow/compute/kernels/vector_selection_test.cc
@@ -2488,7 +2488,7 @@ TEST(TestIndicesNonZero, IndicesNonZeroBoolean) {
   Datum actual;
   std::shared_ptr<Array> result;
 
-  // boool
+  // bool
   ASSERT_OK_AND_ASSIGN(
       actual, CallFunction("indices_nonzero",
                            {ArrayFromJSON(boolean(), "[null, true, false, 
true]")}));
diff --git a/cpp/src/arrow/compute/key_map.cc b/cpp/src/arrow/compute/key_map.cc
index 525dae850f..a027ec811c 100644
--- a/cpp/src/arrow/compute/key_map.cc
+++ b/cpp/src/arrow/compute/key_map.cc
@@ -505,7 +505,7 @@ void SwissTable::find(const int num_keys, const uint32_t* 
hashes,
 
 // Slow processing of input keys in the most generic case.
 // Handles inserting new keys.
-// Pre-existing keys will be handled correctly, although the intended use is 
for this
+// Preexisting keys will be handled correctly, although the intended use is 
for this
 // call to follow a call to find() method, which would only pass on new keys 
that were
 // not present in the hash table.
 //
@@ -617,7 +617,7 @@ Status SwissTable::map_new_keys(uint32_t num_ids, uint16_t* 
ids, const uint32_t*
   ARROW_DCHECK(static_cast<int>(num_ids) <= (1 << log_minibatch_));
   ARROW_DCHECK(static_cast<int>(max_id + 1) <= (1 << log_minibatch_));
 
-  // Allocate temporary buffers for slot ids and intialize them
+  // Allocate temporary buffers for slot ids and initialize them
   auto slot_ids_buf = util::TempVectorHolder<uint32_t>(temp_stack, max_id + 1);
   uint32_t* slot_ids = slot_ids_buf.mutable_data();
   init_slot_ids_for_new_keys(num_ids, ids, hashes, slot_ids);
diff --git a/cpp/src/arrow/compute/key_map.h b/cpp/src/arrow/compute/key_map.h
index 85ef9029d6..8e06dc8348 100644
--- a/cpp/src/arrow/compute/key_map.h
+++ b/cpp/src/arrow/compute/key_map.h
@@ -142,7 +142,7 @@ class ARROW_EXPORT SwissTable {
   void extract_group_ids_imp(const int num_keys, const uint16_t* selection,
                              const uint32_t* hashes, const uint8_t* 
local_slots,
                              uint32_t* out_group_ids, int elements_offset,
-                             int element_mutltiplier) const;
+                             int element_multiplier) const;
 
   inline uint64_t next_slot_to_visit(uint64_t block_index, int slot,
                                      int match_found) const;
@@ -187,7 +187,7 @@ class ARROW_EXPORT SwissTable {
 
   // Slow processing of input keys in the most generic case.
   // Handles inserting new keys.
-  // Pre-existing keys will be handled correctly, although the intended use is 
for this
+  // Preexisting keys will be handled correctly, although the intended use is 
for this
   // call to follow a call to find() method, which would only pass on new keys 
that were
   // not present in the hash table.
   //
diff --git a/cpp/src/arrow/compute/key_map_avx2.cc 
b/cpp/src/arrow/compute/key_map_avx2.cc
index 7315535110..3526a6cb0f 100644
--- a/cpp/src/arrow/compute/key_map_avx2.cc
+++ b/cpp/src/arrow/compute/key_map_avx2.cc
@@ -117,7 +117,7 @@ int SwissTable::early_filter_imp_avx2_x8(const int 
num_hashes, const uint32_t* h
     vlocal_slot = _mm256_add_epi32(_mm256_and_si256(vlocal_slot, 
_mm256_set1_epi32(0xff)),
                                    _mm256_and_si256(vgt, 
_mm256_set1_epi32(4)));
 
-    // Convert slot id relative to the block to slot id relative to the 
beginnning of the
+    // Convert slot id relative to the block to slot id relative to the 
beginning of the
     // table
     //
     uint64_t local_slot = _mm256_extract_epi64(
diff --git a/cpp/src/arrow/compute/light_array.cc 
b/cpp/src/arrow/compute/light_array.cc
index 93a054de19..73ea01a03a 100644
--- a/cpp/src/arrow/compute/light_array.cc
+++ b/cpp/src/arrow/compute/light_array.cc
@@ -89,7 +89,7 @@ KeyColumnArray KeyColumnArray::Slice(int64_t offset, int64_t 
length) const {
   sliced.bit_offset_[0] = (bit_offset_[0] + offset) % 8;
 
   if (metadata_.fixed_length == 0 && !metadata_.is_null_type) {
-    ARROW_DCHECK(is_bool_type()) << "Expected BOOL type type but got a 
different type.";
+    ARROW_DCHECK(is_bool_type()) << "Expected BOOL type but got a different 
type.";
     sliced.buffers_[1] =
         buffers_[1] ? buffers_[1] + (bit_offset_[1] + offset) / 8 : nullptr;
     sliced.mutable_buffers_[1] = mutable_buffers_[1]
diff --git a/cpp/src/arrow/compute/light_array_test.cc 
b/cpp/src/arrow/compute/light_array_test.cc
index 52121530fe..3ceba43604 100644
--- a/cpp/src/arrow/compute/light_array_test.cc
+++ b/cpp/src/arrow/compute/light_array_test.cc
@@ -333,7 +333,7 @@ TEST(ResizableArrayData, Binary) {
       ASSERT_EQ(0, array.num_rows());
       ASSERT_OK(array.ResizeFixedLengthBuffers(2));
       ASSERT_EQ(2, array.num_rows());
-      // At this point the offets memory has been allocated and needs to be 
filled
+      // At this point the offsets memory has been allocated and needs to be 
filled
       // in before we allocate the variable length memory
       int offsets_width =
           
static_cast<int>(arrow::internal::checked_pointer_cast<BaseBinaryType>(type)
diff --git a/cpp/src/arrow/compute/ordering.h b/cpp/src/arrow/compute/ordering.h
index e581269cc2..61caa2b570 100644
--- a/cpp/src/arrow/compute/ordering.h
+++ b/cpp/src/arrow/compute/ordering.h
@@ -52,7 +52,7 @@ class ARROW_EXPORT SortKey : public 
util::EqualityComparable<SortKey> {
   bool Equals(const SortKey& other) const;
   std::string ToString() const;
 
-  /// A FieldRef targetting the sort column.
+  /// A FieldRef targeting the sort column.
   FieldRef target;
   /// How to order by this sort key.
   SortOrder order;
diff --git a/cpp/src/arrow/compute/registry_test.cc 
b/cpp/src/arrow/compute/registry_test.cc
index 2d69f119df..3dc14bcff8 100644
--- a/cpp/src/arrow/compute/registry_test.cc
+++ b/cpp/src/arrow/compute/registry_test.cc
@@ -69,7 +69,7 @@ TEST_P(TestRegistry, Basics) {
   ASSERT_OK_AND_ASSIGN(std::shared_ptr<const Function> f1, 
registry_->GetFunction("f1"));
   ASSERT_EQ("f1", f1->name());
 
-  // Non-existent function
+  // Nonexistent function
   ASSERT_RAISES(KeyError, registry_->GetFunction("f2"));
 
   // Try adding a function with name collision
diff --git a/cpp/src/arrow/compute/row/grouper.cc 
b/cpp/src/arrow/compute/row/grouper.cc
index b3d28ef19a..5e23eda16f 100644
--- a/cpp/src/arrow/compute/row/grouper.cc
+++ b/cpp/src/arrow/compute/row/grouper.cc
@@ -210,7 +210,7 @@ struct SimpleKeySegmenter : public BaseRowSegmenter {
 
  private:
   TypeHolder key_type_;
-  std::vector<uint8_t> save_key_data_;  // previusly seen segment-key grouping 
data
+  std::vector<uint8_t> save_key_data_;  // previously seen segment-key 
grouping data
   bool extend_was_called_;
 };
 
diff --git a/cpp/src/arrow/compute/row/grouper.h 
b/cpp/src/arrow/compute/row/grouper.h
index 15f00eaac2..628a9c14f3 100644
--- a/cpp/src/arrow/compute/row/grouper.h
+++ b/cpp/src/arrow/compute/row/grouper.h
@@ -29,12 +29,12 @@ namespace arrow {
 namespace compute {
 
 /// \brief A segment
-/// A segment group is a chunk of continous rows that have the same segment 
key. (For
+/// A segment group is a chunk of continuous rows that have the same segment 
key. (For
 /// example, in ordered time series processing, segment key can be "date", and 
a segment
 /// group can be all the rows that belong to the same date.) A segment group 
can span
-/// across multiple exec batches. A segment is a chunk of continous rows that 
has the same
-/// segment key within a given batch. When a segment group span cross batches, 
it will
-/// have multiple segments. A segment never spans cross batches. The segment 
data
+/// across multiple exec batches. A segment is a chunk of continuous rows that 
has the
+/// same segment key within a given batch. When a segment group span cross 
batches, it
+/// will have multiple segments. A segment never spans cross batches. The 
segment data
 /// structure only makes sense when used along with a exec batch.
 struct ARROW_EXPORT Segment {
   /// \brief the offset into the batch where the segment starts
@@ -92,7 +92,7 @@ class ARROW_EXPORT RowSegmenter {
   /// \brief Reset this segmenter
   ///
   /// A segmenter normally extends (see `Segment`) a segment from one batch to 
the next.
-  /// If segment-extenion is undesirable, for example when each batch is 
processed
+  /// If segment-extension is undesirable, for example when each batch is 
processed
   /// independently, then `Reset` should be invoked before processing the next 
batch.
   virtual Status Reset() = 0;
 


Reply via email to