diff --git a/cpp/src/arrow/compute/kernels/scalar_string.cc b/cpp/src/arrow/compute/kernels/scalar_string.cc index 5378bac157421..b4c2c8c41c97a 100644 --- a/cpp/src/arrow/compute/kernels/scalar_string.cc +++ b/cpp/src/arrow/compute/kernels/scalar_string.cc @@ -2783,7 +2783,7 @@ struct AsciiPadTransform : public StringTransformBase { int64_t left = 0; int64_t right = 0; if (PadLeft && PadRight) { - // If odd number of spaces, put them on the left + // If odd number of spaces, put the extra space on the left right = spaces / 2; left = spaces - right; } else if (PadLeft) { @@ -2839,7 +2839,7 @@ struct Utf8PadTransform : public StringTransformBase { int64_t left = 0; int64_t right = 0; if (PadLeft && PadRight) { - // If odd number of spaces, put them on the left + // If odd number of spaces, put the extra space on the left right = spaces / 2; left = spaces - right; } else if (PadLeft) {