Skip to content

Commit

Permalink
apacheGH-38962: [C++] Fix spelling (array) (apache#38963)
Browse files Browse the repository at this point in the history
### 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: apache#38962

Authored-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Felipe Oliveira Carvalho <felipekde@gmail.com>
  • Loading branch information
jsoref authored and clayburn committed Jan 23, 2024
1 parent f264f57 commit e3c21aa
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion cpp/src/arrow/array/array_binary.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

// Array accessor classes for Binary, LargeBinart, String, LargeString,
// Array accessor classes for Binary, LargeBinary, String, LargeString,
// FixedSizeBinary

#pragma once
Expand Down
4 changes: 2 additions & 2 deletions cpp/src/arrow/array/array_dict.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class ARROW_EXPORT DictionaryUnifier {
static Result<std::unique_ptr<DictionaryUnifier>> Make(
std::shared_ptr<DataType> value_type, MemoryPool* pool = default_memory_pool());

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

/// \brief Unify dictionaries accross the chunks of each table column
/// \brief Unify dictionaries across the chunks of each table column
///
/// The dictionaries in each table column will be unified, their indices
/// accordingly transposed.
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/arrow/array/array_dict_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1130,7 +1130,7 @@ TEST(TestDictionary, Validate) {
ASSERT_RAISES(Invalid, arr->ValidateFull());

#if !defined(__APPLE__) && !defined(ARROW_VALGRIND)
// GH-35712: ASSERT_DEATH would make testing slow on MacOS.
// GH-35712: ASSERT_DEATH would make testing slow on macOS.
ASSERT_DEATH(
{
std::shared_ptr<Array> null_dict_arr =
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/arrow/array/array_list_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ class TestListArray : public ::testing::Test {
ASSERT_OK(result->ValidateFull());
AssertArraysEqual(*result, *expected);

// Offets without nulls, will replace null with empty list
// Offsets without nulls, will replace null with empty list
ASSERT_OK_AND_ASSIGN(result, FromArrays(*offsets_wo_nulls, *sizes_wo_nulls, *values));
ASSERT_OK(result->ValidateFull());
AssertArraysEqual(*result, *std::dynamic_pointer_cast<ArrayType>(
Expand Down
4 changes: 2 additions & 2 deletions cpp/src/arrow/array/array_nested.cc
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ Result<std::shared_ptr<ArrayData>> ListViewFromListImpl(
const auto* offsets = list_data->template GetValues<offset_type>(1, 0);
auto* sizes = sizes_buffer->mutable_data_as<offset_type>();
// Zero the initial padding area to avoid leaking any data when buffers are
// sent over IPC or throught the C Data interface.
// sent over IPC or through the C Data interface.
memset(sizes, 0, list_data->offset * sizeof(offset_type));
for (int64_t i = list_data->offset; i < buffer_length; i++) {
sizes[i] = offsets[i + 1] - offsets[i];
Expand Down Expand Up @@ -776,7 +776,7 @@ Result<std::shared_ptr<Array>> MapArray::FromArraysInternal(
}

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

if (keys->length() != items->length()) {
Expand Down
6 changes: 3 additions & 3 deletions cpp/src/arrow/array/array_run_end.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class ARROW_EXPORT RunEndEncodedArray : public Array {
///
/// The length and offset parameters refer to the dimensions of the logical
/// array which is the array we would get after expanding all the runs into
/// repeated values. As such, length can be much greater than the lenght of
/// repeated values. As such, length can be much greater than the length of
/// the child run_ends and values arrays.
RunEndEncodedArray(const std::shared_ptr<DataType>& type, int64_t length,
const std::shared_ptr<Array>& run_ends,
Expand All @@ -69,7 +69,7 @@ class ARROW_EXPORT RunEndEncodedArray : public Array {
///
/// The length and offset parameters refer to the dimensions of the logical
/// array which is the array we would get after expanding all the runs into
/// repeated values. As such, length can be much greater than the lenght of
/// repeated values. As such, length can be much greater than the length of
/// the child run_ends and values arrays.
static Result<std::shared_ptr<RunEndEncodedArray>> Make(
const std::shared_ptr<DataType>& type, int64_t logical_length,
Expand Down Expand Up @@ -122,7 +122,7 @@ class ARROW_EXPORT RunEndEncodedArray : public Array {
/// run-ends) necessary to represent the logical range of values from offset
/// to length.
///
/// Avoid calling this function if the physical length can be estabilished in
/// Avoid calling this function if the physical length can be established in
/// some other way (e.g. when iterating over the runs sequentially until the
/// end). This function uses binary-search, so it has a O(log N) cost.
int64_t FindPhysicalLength() const;
Expand Down
8 changes: 4 additions & 4 deletions cpp/src/arrow/array/array_struct_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ TEST_F(TestStructBuilder, TestEquality) {
ASSERT_OK(char_vb->Reserve(list_values.size()));
ASSERT_OK(int_vb->Reserve(int_values.size()));

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

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

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

// setup anunequal one with unequal values
// set up an unequal one with unequal values
ASSERT_OK(builder_->AppendValues(struct_is_valid.size(), struct_is_valid.data()));
ASSERT_OK(list_vb->AppendValues(list_offsets.data(), list_offsets.size(),
list_is_valid.data()));
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/arrow/array/builder_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ inline Result<std::unique_ptr<ArrayBuilder>> MakeBuilderExactIndex(
}

/// \brief Construct an empty DictionaryBuilder initialized optionally
/// with a pre-existing dictionary
/// with a preexisting dictionary
/// \param[in] pool the MemoryPool to use for allocations
/// \param[in] type the dictionary type to create the builder for
/// \param[in] dictionary the initial dictionary, if any. May be nullptr
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/arrow/array/builder_nested.h
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ class ARROW_EXPORT FixedSizeListBuilder : public ArrayBuilder {

/// \brief Vector append
///
/// If passed, valid_bytes wil be read and any zero byte
/// If passed, valid_bytes will be read and any zero byte
/// will cause the corresponding slot to be null
///
/// This function affects only the validity bitmap; the child values must be appended
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/arrow/array/data.cc
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ void ArraySpan::SetMembers(const ArrayData& data) {
this->null_count = 0;
}

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

0 comments on commit e3c21aa

Please sign in to comment.