This is an automated email from the ASF dual-hosted git repository.
Jefffrey pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-rs.git
The following commit(s) were added to refs/heads/main by this push:
new f224f45173 chore: Fix duplicated word typos in comments and docs
(#11034)
f224f45173 is described below
commit f224f4517390ae0a1aba2e11fa87da66dc9612af
Author: geographybuff <[email protected]>
AuthorDate: Tue Sep 15 01:00:40 2026 -0300
chore: Fix duplicated word typos in comments and docs (#11034)
# Which issue does this PR close?
N/A — small standalone cleanup, following the precedent of recent
comment-typo PRs merged without a linked issue:
- #10956 `chore: Fix typos` (47 files, +108/-107)
- #10943 `chore: fix typos in code comments` (11 files, +16/-16)
- #10530 `chore: fix typo in release email template`
# Rationale for this change
Several comments contain accidentally doubled words — `run-encoded
encoded data`, `and and an offset`, `typed typed on`, `are used used`.
Most are rustdoc on public items, so they render on docs.rs.
These survive automated checking because the CI spell check
(`.github/ci/scripts/typos_check.sh`, the `typos` crate) matches
misspelled *words* and does not detect a correctly spelled word repeated
twice in a row. `typos --config typos.toml` passes on both the
unmodified tree and this branch.
One case is more than cosmetic. In
`parquet/src/file/metadata/thrift/mod.rs`, the `PageHeader` doc comment
is a transcription of the Parquet Thrift IDL, and reads `to be be
calculated as follows`. Upstream `parquet-format`'s `parquet.thrift`
reads `to be calculated`, so this is a transcription slip and the fix
restores agreement with the spec.
Found by searching the tree for `\b(\w+)\s+\1\b` restricted to comment
and prose lines. The remaining matches are ASCII-art layout diagrams in
`list_array.rs` / `list_view_array.rs` (`Logical Logical` column
headings) and correct English like `100-row row group`; those are left
alone.
# What changes are included in this PR?
Removes 13 doubled words across 11 Rust files and 1 Markdown file.
Comment and prose text only — no code changes.
| File | Fix |
| --- | --- |
| `arrow-buffer/src/lib.rs` | `Run-ends used in run-encoded encoded
data` |
| `arrow-buffer/src/util/bit_chunk_iterator.rs` | `and and an offset and
length in bits` |
| `arrow-array/src/array/run_array.rs` | `A RunArray typed typed on its
child values array` |
| `arrow-data/src/data.rs` | `2. the the null count is correct` |
| `arrow-data/src/transform/mod.rs` | `Note this this is not stored in
_MutableArrayData` |
| `parquet/src/file/properties.rs` | `default values for ndv and fpp
value are used used` |
| `parquet/src/file/metadata/mod.rs` (x2) | `Takes ownership of the the
column metadata`; `Returns a reference to the the histogram's values` |
| `parquet/src/file/metadata/thrift/mod.rs` | `CRC checksum for the
page, to be be calculated` |
| `parquet/src/arrow/mod.rs` | `the AES encryption keys required
required for decrypting` |
| `parquet/src/arrow/arrow_reader/mod.rs` | `maximum size of value to
pass to to value generator` |
| `parquet/src/arrow/arrow_reader/statistics.rs` | `extracting i128
values from from an iterator` |
| `parquet_derive/README.md` | `You must must enable the chrono feature`
|
# Are these changes tested?
No new tests — the change is confined to comments and prose, so there is
no behaviour to cover.
Checks run locally on Linux x86_64 with the pinned 1.98.1 toolchain:
- `typos --config typos.toml` (v1.37.0, the version pinned in `dev.yml`)
— pass
- `cargo fmt --all --check` — pass
- `cargo test --doc -p arrow-buffer -p arrow-array -p arrow-data -p
parquet --all-features` — pass, 376 doctests, 0 failed (arrow-array 206,
parquet 96, arrow-buffer 60, arrow-data 14)
This first failed with 5 errors, all of them `PARQUET_TEST_DATA is
undefined` from an uninitialised `parquet-testing` submodule rather than
anything in this PR. The numbers above are from the re-run after `git
submodule update --init`.
`parquet_derive/README.md` is outside the prettier glob in `dev.yml`
(`{arrow,arrow-flight,dev,arrow-integration-testing,parquet}/**/*.md`),
so the docs formatting job is unaffected.
I did not run the full test suite. One edited line sits inside a rustdoc
example (`parquet/src/arrow/mod.rs`, the encryption example), and that
doctest is covered by the run above; every other edited line is an
ordinary comment.
# Are there any user-facing changes?
No API or behaviour changes. The rendered rustdoc is corrected for
`RunEndBuffer`, `UnalignedBitChunk::new`, `Int64RunArray`, `ArrayData`,
`WriterProperties`, `ColumnChunkMetaDataBuilder::take_column_metadata`,
`Histogram::values`, `PageHeader`, and two `parquet::arrow` reader
items.
---
## AI disclosure
This contribution was AI-assisted. Claude Code (Claude Opus 5) performed
the tree-wide doubled-word search, made the 13 line edits, checked the
`PageHeader` comment against upstream `parquet-format`, and ran every
check listed above. The check commands were executed by the AI and have
not been independently re-run by hand.
---------
Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Co-authored-by: Jeffrey Vo <[email protected]>
---
arrow-array/src/array/run_array.rs | 2 +-
arrow-buffer/src/lib.rs | 2 +-
arrow-buffer/src/util/bit_chunk_iterator.rs | 2 +-
arrow-data/src/data.rs | 2 +-
arrow-data/src/transform/mod.rs | 2 +-
parquet/src/arrow/arrow_reader/mod.rs | 2 +-
parquet/src/arrow/arrow_reader/statistics.rs | 2 +-
parquet/src/arrow/mod.rs | 2 +-
parquet/src/file/metadata/mod.rs | 4 ++--
parquet/src/file/metadata/thrift/mod.rs | 2 +-
parquet/src/file/properties.rs | 2 +-
parquet_derive/README.md | 2 +-
12 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/arrow-array/src/array/run_array.rs
b/arrow-array/src/array/run_array.rs
index 7255eb50d3..ca5155569f 100644
--- a/arrow-array/src/array/run_array.rs
+++ b/arrow-array/src/array/run_array.rs
@@ -670,7 +670,7 @@ pub type Int32RunArray = RunArray<Int32Type>;
/// ```
pub type Int64RunArray = RunArray<Int64Type>;
-/// A [`RunArray`] typed typed on its child values array
+/// A [`RunArray`] typed on its child values array
///
/// Implements [`ArrayAccessor`] and [`IntoIterator`] allowing fast access to
its elements
///
diff --git a/arrow-buffer/src/lib.rs b/arrow-buffer/src/lib.rs
index 3e4fc828f6..cd4d662dbb 100644
--- a/arrow-buffer/src/lib.rs
+++ b/arrow-buffer/src/lib.rs
@@ -30,7 +30,7 @@
//! - [`NullBuffer`][]: Arrow null (validity) bitmaps ([`BooleanBuffer`] with
extra utilities)
//! - [`ScalarBuffer<T>`][]: Typed buffer for primitive types (e.g., `i32`,
`f64`)
//! - [`OffsetBuffer<O>`][]: Offsets used in variable-length types (e.g.,
strings, lists)
-//! - [`RunEndBuffer<E>`][]: Run-ends used in run-encoded encoded data
+//! - [`RunEndBuffer<E>`][]: Run-ends used in run-encoded data
#![doc(
html_logo_url =
"https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_white-bg.svg",
diff --git a/arrow-buffer/src/util/bit_chunk_iterator.rs
b/arrow-buffer/src/util/bit_chunk_iterator.rs
index 73b849d9a7..77c98000cb 100644
--- a/arrow-buffer/src/util/bit_chunk_iterator.rs
+++ b/arrow-buffer/src/util/bit_chunk_iterator.rs
@@ -38,7 +38,7 @@ pub struct UnalignedBitChunk<'a> {
}
impl<'a> UnalignedBitChunk<'a> {
- /// Create a from a byte array, and and an offset and length in bits
+ /// Create from a byte array, offset and length in bits
pub fn new(buffer: &'a [u8], offset: usize, len: usize) -> Self {
if len == 0 {
return Self {
diff --git a/arrow-data/src/data.rs b/arrow-data/src/data.rs
index 5f68e6548f..b911416506 100644
--- a/arrow-data/src/data.rs
+++ b/arrow-data/src/data.rs
@@ -1494,7 +1494,7 @@ impl ArrayData {
///
/// Does not (yet) check
/// 1. Union type_ids are valid see
[#85](https://github.com/apache/arrow-rs/issues/85)
- /// 2. the the null count is correct and that any
+ /// 2. the null count is correct and that any
/// 3. nullability requirements of its children are correct
///
/// [#85]: https://github.com/apache/arrow-rs/issues/85
diff --git a/arrow-data/src/transform/mod.rs b/arrow-data/src/transform/mod.rs
index 989e502e09..2db03a42aa 100644
--- a/arrow-data/src/transform/mod.rs
+++ b/arrow-data/src/transform/mod.rs
@@ -156,7 +156,7 @@ pub struct MutableArrayData<'a> {
/// Variadic data buffers referenced by views.
///
- /// Note this this is not stored in `_MutableArrayData` because these
values
+ /// Note this is not stored in `_MutableArrayData` because these values
/// are constant and only needed at the end, when freezing
/// [_MutableArrayData]
variadic_data_buffers: Vec<Buffer>,
diff --git a/parquet/src/arrow/arrow_reader/mod.rs
b/parquet/src/arrow/arrow_reader/mod.rs
index 056bc97a09..1e482bbe51 100644
--- a/parquet/src/arrow/arrow_reader/mod.rs
+++ b/parquet/src/arrow/arrow_reader/mod.rs
@@ -3375,7 +3375,7 @@ pub(crate) mod tests {
/// `ParquetFileArrowReader` using a standard set of parameters
/// `opts`.
///
- /// `rand_max` represents the maximum size of value to pass to to
+ /// `rand_max` represents the maximum size of value to pass to
/// value generator
fn run_single_column_reader_tests<T, F, G>(
rand_max: i32,
diff --git a/parquet/src/arrow/arrow_reader/statistics.rs
b/parquet/src/arrow/arrow_reader/statistics.rs
index 8ef4cc4544..486e937a79 100644
--- a/parquet/src/arrow/arrow_reader/statistics.rs
+++ b/parquet/src/arrow/arrow_reader/statistics.rs
@@ -231,7 +231,7 @@ make_stats_iterator!(
[u8]
);
-/// Special iterator adapter for extracting i128 values from from an iterator
of
+/// Special iterator adapter for extracting i128 values from an iterator of
/// `ParquetStatistics`
///
/// Handles checking if the statistics are present and valid with the correct
type.
diff --git a/parquet/src/arrow/mod.rs b/parquet/src/arrow/mod.rs
index 8309a35e9b..e2ea1b4ca0 100644
--- a/parquet/src/arrow/mod.rs
+++ b/parquet/src/arrow/mod.rs
@@ -149,7 +149,7 @@
//! #
//! let file = File::open(path).unwrap();
//!
-//! // Define the AES encryption keys required required for decrypting the
footer metadata
+//! // Define the AES encryption keys required for decrypting the footer
metadata
//! // and column-specific data. If only a footer key is used then it is
assumed that the
//! // file uses uniform encryption and all columns are encrypted with the
footer key.
//! // If any column keys are specified, other columns without a key provided
are assumed
diff --git a/parquet/src/file/metadata/mod.rs b/parquet/src/file/metadata/mod.rs
index 0520db7b05..166a7eb7ab 100644
--- a/parquet/src/file/metadata/mod.rs
+++ b/parquet/src/file/metadata/mod.rs
@@ -726,7 +726,7 @@ impl RowGroupMetaDataBuilder {
self
}
- /// Takes ownership of the the column metadata in this builder, and clears
+ /// Takes ownership of the column metadata in this builder, and clears
/// the list of columns.
///
/// This can be used for more efficient creation of a new RowGroupMetaData
@@ -843,7 +843,7 @@ impl LevelHistogram {
None
}
}
- /// Returns a reference to the the histogram's values.
+ /// Returns a reference to the histogram's values.
pub fn values(&self) -> &[i64] {
&self.inner
}
diff --git a/parquet/src/file/metadata/thrift/mod.rs
b/parquet/src/file/metadata/thrift/mod.rs
index 8d590079cc..8bc0cbbd0b 100644
--- a/parquet/src/file/metadata/thrift/mod.rs
+++ b/parquet/src/file/metadata/thrift/mod.rs
@@ -1178,7 +1178,7 @@ pub(crate) struct PageHeader {
/// Compressed (and potentially encrypted) page size in bytes, not including
this header
3: required i32 compressed_page_size
- /// The 32-bit CRC checksum for the page, to be be calculated as follows:
+ /// The 32-bit CRC checksum for the page, to be calculated as follows:
4: optional i32 crc
// Headers for page specific data. One only will be set.
diff --git a/parquet/src/file/properties.rs b/parquet/src/file/properties.rs
index 3de032d4f9..34dc983eac 100644
--- a/parquet/src/file/properties.rs
+++ b/parquet/src/file/properties.rs
@@ -1187,7 +1187,7 @@ impl WriterPropertiesBuilder {
/// * If the bloom filter is enabled previously then it is a no-op.
///
/// * If the bloom filter is not enabled, default values for ndv and fpp
- /// value are used used. See [`set_bloom_filter_max_ndv`] and
+ /// value are used. See [`set_bloom_filter_max_ndv`] and
/// [`set_bloom_filter_fpp`] to further adjust the ndv and fpp.
///
/// [`set_bloom_filter_max_ndv`]: Self::set_bloom_filter_max_ndv
diff --git a/parquet_derive/README.md b/parquet_derive/README.md
index 6423fa5a51..e17c5bd8e5 100644
--- a/parquet_derive/README.md
+++ b/parquet_derive/README.md
@@ -24,7 +24,7 @@ generate readers or writers for arbitrarily nested
structures. It only works for
generic structures and various levels of reference. Please see features
checklist for what is currently
supported.
-Derive also has some support for the chrono time library. You must must enable
the `chrono` feature to get this support.
+Derive also has some support for the chrono time library. You must enable the
`chrono` feature to get this support.
## Usage