Skip to content

Commit 30c4e15

Browse files
authored
GH-38962: [C++] Fix spelling (array) (#38963)
### Rationale for this change ### What changes are included in this PR? Spelling fixes to cpp/src/arrow/array/ ### Are these changes tested? ### Are there any user-facing changes? * Closes: #38962 Authored-by: Josh Soref <2119212+jsoref@users.noreply.github.com> Signed-off-by: Felipe Oliveira Carvalho <felipekde@gmail.com>
1 parent 0b3c459 commit 30c4e15

10 files changed

Lines changed: 17 additions & 17 deletions

cpp/src/arrow/array/array_binary.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18-
// Array accessor classes for Binary, LargeBinart, String, LargeString,
18+
// Array accessor classes for Binary, LargeBinary, String, LargeString,
1919
// FixedSizeBinary
2020

2121
#pragma once

cpp/src/arrow/array/array_dict.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ class ARROW_EXPORT DictionaryUnifier {
133133
static Result<std::unique_ptr<DictionaryUnifier>> Make(
134134
std::shared_ptr<DataType> value_type, MemoryPool* pool = default_memory_pool());
135135

136-
/// \brief Unify dictionaries accross array chunks
136+
/// \brief Unify dictionaries across array chunks
137137
///
138138
/// The dictionaries in the array chunks will be unified, their indices
139139
/// accordingly transposed.
@@ -144,7 +144,7 @@ class ARROW_EXPORT DictionaryUnifier {
144144
const std::shared_ptr<ChunkedArray>& array,
145145
MemoryPool* pool = default_memory_pool());
146146

147-
/// \brief Unify dictionaries accross the chunks of each table column
147+
/// \brief Unify dictionaries across the chunks of each table column
148148
///
149149
/// The dictionaries in each table column will be unified, their indices
150150
/// accordingly transposed.

cpp/src/arrow/array/array_dict_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1130,7 +1130,7 @@ TEST(TestDictionary, Validate) {
11301130
ASSERT_RAISES(Invalid, arr->ValidateFull());
11311131

11321132
#if !defined(__APPLE__) && !defined(ARROW_VALGRIND)
1133-
// GH-35712: ASSERT_DEATH would make testing slow on MacOS.
1133+
// GH-35712: ASSERT_DEATH would make testing slow on macOS.
11341134
ASSERT_DEATH(
11351135
{
11361136
std::shared_ptr<Array> null_dict_arr =

cpp/src/arrow/array/array_list_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ class TestListArray : public ::testing::Test {
300300
ASSERT_OK(result->ValidateFull());
301301
AssertArraysEqual(*result, *expected);
302302

303-
// Offets without nulls, will replace null with empty list
303+
// Offsets without nulls, will replace null with empty list
304304
ASSERT_OK_AND_ASSIGN(result, FromArrays(*offsets_wo_nulls, *sizes_wo_nulls, *values));
305305
ASSERT_OK(result->ValidateFull());
306306
AssertArraysEqual(*result, *std::dynamic_pointer_cast<ArrayType>(

cpp/src/arrow/array/array_nested.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ Result<std::shared_ptr<ArrayData>> ListViewFromListImpl(
391391
const auto* offsets = list_data->template GetValues<offset_type>(1, 0);
392392
auto* sizes = sizes_buffer->mutable_data_as<offset_type>();
393393
// Zero the initial padding area to avoid leaking any data when buffers are
394-
// sent over IPC or throught the C Data interface.
394+
// sent over IPC or through the C Data interface.
395395
memset(sizes, 0, list_data->offset * sizeof(offset_type));
396396
for (int64_t i = list_data->offset; i < buffer_length; i++) {
397397
sizes[i] = offsets[i + 1] - offsets[i];
@@ -776,7 +776,7 @@ Result<std::shared_ptr<Array>> MapArray::FromArraysInternal(
776776
}
777777

778778
if (keys->null_count() != 0) {
779-
return Status::Invalid("Map can not contain NULL valued keys");
779+
return Status::Invalid("Map cannot contain NULL valued keys");
780780
}
781781

782782
if (keys->length() != items->length()) {

cpp/src/arrow/array/array_run_end.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class ARROW_EXPORT RunEndEncodedArray : public Array {
5959
///
6060
/// The length and offset parameters refer to the dimensions of the logical
6161
/// array which is the array we would get after expanding all the runs into
62-
/// repeated values. As such, length can be much greater than the lenght of
62+
/// repeated values. As such, length can be much greater than the length of
6363
/// the child run_ends and values arrays.
6464
RunEndEncodedArray(const std::shared_ptr<DataType>& type, int64_t length,
6565
const std::shared_ptr<Array>& run_ends,
@@ -69,7 +69,7 @@ class ARROW_EXPORT RunEndEncodedArray : public Array {
6969
///
7070
/// The length and offset parameters refer to the dimensions of the logical
7171
/// array which is the array we would get after expanding all the runs into
72-
/// repeated values. As such, length can be much greater than the lenght of
72+
/// repeated values. As such, length can be much greater than the length of
7373
/// the child run_ends and values arrays.
7474
static Result<std::shared_ptr<RunEndEncodedArray>> Make(
7575
const std::shared_ptr<DataType>& type, int64_t logical_length,
@@ -122,7 +122,7 @@ class ARROW_EXPORT RunEndEncodedArray : public Array {
122122
/// run-ends) necessary to represent the logical range of values from offset
123123
/// to length.
124124
///
125-
/// Avoid calling this function if the physical length can be estabilished in
125+
/// Avoid calling this function if the physical length can be established in
126126
/// some other way (e.g. when iterating over the runs sequentially until the
127127
/// end). This function uses binary-search, so it has a O(log N) cost.
128128
int64_t FindPhysicalLength() const;

cpp/src/arrow/array/array_struct_test.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ TEST_F(TestStructBuilder, TestEquality) {
541541
ASSERT_OK(char_vb->Reserve(list_values.size()));
542542
ASSERT_OK(int_vb->Reserve(int_values.size()));
543543

544-
// setup two equal arrays, one of which takes an unequal bitmap
544+
// set up two equal arrays, one of which takes an unequal bitmap
545545
ASSERT_OK(builder_->AppendValues(struct_is_valid.size(), struct_is_valid.data()));
546546
ASSERT_OK(list_vb->AppendValues(list_offsets.data(), list_offsets.size(),
547547
list_is_valid.data()));
@@ -574,7 +574,7 @@ TEST_F(TestStructBuilder, TestEquality) {
574574
ASSERT_OK(char_vb->Resize(list_values.size()));
575575
ASSERT_OK(int_vb->Resize(int_values.size()));
576576

577-
// setup an unequal one with the unequal bitmap
577+
// set up an unequal one with the unequal bitmap
578578
ASSERT_OK(builder_->AppendValues(unequal_struct_is_valid.size(),
579579
unequal_struct_is_valid.data()));
580580
ASSERT_OK(list_vb->AppendValues(list_offsets.data(), list_offsets.size(),
@@ -592,7 +592,7 @@ TEST_F(TestStructBuilder, TestEquality) {
592592
ASSERT_OK(char_vb->Resize(list_values.size()));
593593
ASSERT_OK(int_vb->Resize(int_values.size()));
594594

595-
// setup an unequal one with unequal offsets
595+
// set up an unequal one with unequal offsets
596596
ASSERT_OK(builder_->AppendValues(struct_is_valid.size(), struct_is_valid.data()));
597597
ASSERT_OK(list_vb->AppendValues(unequal_list_offsets.data(),
598598
unequal_list_offsets.size(),
@@ -610,7 +610,7 @@ TEST_F(TestStructBuilder, TestEquality) {
610610
ASSERT_OK(char_vb->Resize(list_values.size()));
611611
ASSERT_OK(int_vb->Resize(int_values.size()));
612612

613-
// setup anunequal one with unequal values
613+
// set up an unequal one with unequal values
614614
ASSERT_OK(builder_->AppendValues(struct_is_valid.size(), struct_is_valid.data()));
615615
ASSERT_OK(list_vb->AppendValues(list_offsets.data(), list_offsets.size(),
616616
list_is_valid.data()));

cpp/src/arrow/array/builder_base.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ inline Result<std::unique_ptr<ArrayBuilder>> MakeBuilderExactIndex(
349349
}
350350

351351
/// \brief Construct an empty DictionaryBuilder initialized optionally
352-
/// with a pre-existing dictionary
352+
/// with a preexisting dictionary
353353
/// \param[in] pool the MemoryPool to use for allocations
354354
/// \param[in] type the dictionary type to create the builder for
355355
/// \param[in] dictionary the initial dictionary, if any. May be nullptr

cpp/src/arrow/array/builder_nested.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,7 @@ class ARROW_EXPORT FixedSizeListBuilder : public ArrayBuilder {
677677

678678
/// \brief Vector append
679679
///
680-
/// If passed, valid_bytes wil be read and any zero byte
680+
/// If passed, valid_bytes will be read and any zero byte
681681
/// will cause the corresponding slot to be null
682682
///
683683
/// This function affects only the validity bitmap; the child values must be appended

cpp/src/arrow/array/data.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ void ArraySpan::SetMembers(const ArrayData& data) {
221221
this->null_count = 0;
222222
}
223223

224-
// Makes sure any other buffers are seen as null / non-existent
224+
// Makes sure any other buffers are seen as null / nonexistent
225225
for (int i = static_cast<int>(data.buffers.size()); i < 3; ++i) {
226226
this->buffers[i] = {};
227227
}

0 commit comments

Comments
 (0)