You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by fe...@apache.org on 2024/01/11 01:39:13 UTC
(arrow) branch main updated: GH-38962: [C++] Fix spelling (array) (#38963)
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 30c4e157a9 GH-38962: [C++] Fix spelling (array) (#38963)
30c4e157a9 is described below
commit 30c4e157a920981a853352ea2c24473496c7e595
Author: Josh Soref <21...@users.noreply.github.com>
AuthorDate: Wed Jan 10 20:39:07 2024 -0500
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 <21...@users.noreply.github.com>
Signed-off-by: Felipe Oliveira Carvalho <fe...@gmail.com>
---
cpp/src/arrow/array/array_binary.h | 2 +-
cpp/src/arrow/array/array_dict.h | 4 ++--
cpp/src/arrow/array/array_dict_test.cc | 2 +-
cpp/src/arrow/array/array_list_test.cc | 2 +-
cpp/src/arrow/array/array_nested.cc | 4 ++--
cpp/src/arrow/array/array_run_end.h | 6 +++---
cpp/src/arrow/array/array_struct_test.cc | 8 ++++----
cpp/src/arrow/array/builder_base.h | 2 +-
cpp/src/arrow/array/builder_nested.h | 2 +-
cpp/src/arrow/array/data.cc | 2 +-
10 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/cpp/src/arrow/array/array_binary.h b/cpp/src/arrow/array/array_binary.h
index fd68a379dd..19fdee6124 100644
--- a/cpp/src/arrow/array/array_binary.h
+++ b/cpp/src/arrow/array/array_binary.h
@@ -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
diff --git a/cpp/src/arrow/array/array_dict.h b/cpp/src/arrow/array/array_dict.h
index 9aa0a7bcc2..bf376b51f8 100644
--- a/cpp/src/arrow/array/array_dict.h
+++ b/cpp/src/arrow/array/array_dict.h
@@ -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.
@@ -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.
diff --git a/cpp/src/arrow/array/array_dict_test.cc b/cpp/src/arrow/array/array_dict_test.cc
index a4c03b5db6..4ae9e3d6dc 100644
--- a/cpp/src/arrow/array/array_dict_test.cc
+++ b/cpp/src/arrow/array/array_dict_test.cc
@@ -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 =
diff --git a/cpp/src/arrow/array/array_list_test.cc b/cpp/src/arrow/array/array_list_test.cc
index 0b591d4018..b08fa99168 100644
--- a/cpp/src/arrow/array/array_list_test.cc
+++ b/cpp/src/arrow/array/array_list_test.cc
@@ -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>(
diff --git a/cpp/src/arrow/array/array_nested.cc b/cpp/src/arrow/array/array_nested.cc
index 0b0e340a67..958c2e2538 100644
--- a/cpp/src/arrow/array/array_nested.cc
+++ b/cpp/src/arrow/array/array_nested.cc
@@ -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];
@@ -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()) {
diff --git a/cpp/src/arrow/array/array_run_end.h b/cpp/src/arrow/array/array_run_end.h
index 9770aa1fbb..b46b0855ab 100644
--- a/cpp/src/arrow/array/array_run_end.h
+++ b/cpp/src/arrow/array/array_run_end.h
@@ -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,
@@ -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,
@@ -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;
diff --git a/cpp/src/arrow/array/array_struct_test.cc b/cpp/src/arrow/array/array_struct_test.cc
index 73d53a7efa..5505ec636c 100644
--- a/cpp/src/arrow/array/array_struct_test.cc
+++ b/cpp/src/arrow/array/array_struct_test.cc
@@ -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()));
@@ -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(),
@@ -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(),
@@ -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()));
diff --git a/cpp/src/arrow/array/builder_base.h b/cpp/src/arrow/array/builder_base.h
index 05af850fd1..11036797e0 100644
--- a/cpp/src/arrow/array/builder_base.h
+++ b/cpp/src/arrow/array/builder_base.h
@@ -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
diff --git a/cpp/src/arrow/array/builder_nested.h b/cpp/src/arrow/array/builder_nested.h
index 21c2d4b270..8065752f3e 100644
--- a/cpp/src/arrow/array/builder_nested.h
+++ b/cpp/src/arrow/array/builder_nested.h
@@ -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
diff --git a/cpp/src/arrow/array/data.cc b/cpp/src/arrow/array/data.cc
index c002c0817b..8454ac8f1d 100644
--- a/cpp/src/arrow/array/data.cc
+++ b/cpp/src/arrow/array/data.cc
@@ -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] = {};
}