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 1c7830d6c8 chore: fix typos in code comments (#10943)
1c7830d6c8 is described below
commit 1c7830d6c80bef2ea9ff705fed272ed39221fd31
Author: MsfPablo <[email protected]>
AuthorDate: Wed Sep 2 03:44:13 2026 +0200
chore: fix typos in code comments (#10943)
# Which issue does this PR close?
N/A — small standalone cleanup.
# Rationale for this change
`codespell` turns up a handful of spelling mistakes in doc comments and
inline comments. One of them is slightly more than cosmetic: the doc
comment on `arrow_arith::arity::try_binary` reads "Allies a binary
infallable function", which should be "Applies a binary infallible
function".
# What changes are included in this PR?
Comment-only spelling fixes across `arrow-schema`, `arrow-arith`,
`arrow-ipc`, `arrow-select`, and `parquet-variant`. No identifiers,
public API, or behaviour changed. Generated sources under
`arrow-ipc/src/gen`, changelogs, and test data were left untouched.
# Are these changes tested?
No tests needed — comments only.
# Are there any user-facing changes?
Only rendered rustdoc text.
---
arrow-arith/src/arity.rs | 2 +-
arrow-ipc/src/writer.rs | 2 +-
arrow-schema/src/extension/mod.rs | 2 +-
arrow-schema/src/ffi.rs | 2 +-
arrow-schema/src/schema.rs | 2 +-
arrow-select/src/union_extract.rs | 10 +++++-----
parquet-variant/src/builder/object.rs | 2 +-
parquet-variant/src/utils.rs | 2 +-
parquet-variant/src/variant.rs | 2 +-
parquet-variant/src/variant/list.rs | 2 +-
parquet-variant/src/variant/object.rs | 4 ++--
11 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/arrow-arith/src/arity.rs b/arrow-arith/src/arity.rs
index b1256e0a70..529a53f018 100644
--- a/arrow-arith/src/arity.rs
+++ b/arrow-arith/src/arity.rs
@@ -69,7 +69,7 @@ where
array.try_unary_mut(op)
}
-/// Allies a binary infallable function to two [`PrimitiveArray`]s,
+/// Applies a binary infallible function to two [`PrimitiveArray`]s,
/// producing a new [`PrimitiveArray`]
///
/// # Details
diff --git a/arrow-ipc/src/writer.rs b/arrow-ipc/src/writer.rs
index 99d40632f2..57a5ef7448 100644
--- a/arrow-ipc/src/writer.rs
+++ b/arrow-ipc/src/writer.rs
@@ -3672,7 +3672,7 @@ mod tests {
ensure_roundtrip(Arc::new(ls.finish()));
}
- /// Read/write a record batch to a File and Stream and ensure it is the
same at the outout
+ /// Read/write a record batch to a File and Stream and ensure it is the
same at the output
fn ensure_roundtrip(array: ArrayRef) {
let num_rows = array.len();
let orig_batch = RecordBatch::try_from_iter(vec![("a",
array)]).unwrap();
diff --git a/arrow-schema/src/extension/mod.rs
b/arrow-schema/src/extension/mod.rs
index 58bbb70497..95a2156760 100644
--- a/arrow-schema/src/extension/mod.rs
+++ b/arrow-schema/src/extension/mod.rs
@@ -207,7 +207,7 @@ pub trait ExtensionType: Sized {
/// The metadata type of this extension type.
///
- /// Implementations can use strongly or loosly typed data structures here
+ /// Implementations can use strongly or loosely typed data structures here
/// depending on the complexity of the metadata.
///
/// Implementations can also use `Self` here if the extension type can be
diff --git a/arrow-schema/src/ffi.rs b/arrow-schema/src/ffi.rs
index 064b4ac16d..ea3bf6adf9 100644
--- a/arrow-schema/src/ffi.rs
+++ b/arrow-schema/src/ffi.rs
@@ -384,7 +384,7 @@ impl FFI_ArrowSchema {
///
/// Panics if `index` is greater than or equal to the number of children.
///
- /// This is to make sure that the unsafe acces to raw pointer is sound.
+ /// This is to make sure that the unsafe access to raw pointer is sound.
pub fn child(&self, index: usize) -> &Self {
assert!(index < self.n_children as usize);
unsafe { self.children.add(index).as_ref().unwrap().as_ref().unwrap() }
diff --git a/arrow-schema/src/schema.rs b/arrow-schema/src/schema.rs
index 85f4d59099..b49b3dfd8a 100644
--- a/arrow-schema/src/schema.rs
+++ b/arrow-schema/src/schema.rs
@@ -144,7 +144,7 @@ impl SchemaBuilder {
&mut self.metadata
}
- /// Reverse the fileds
+ /// Reverse the fields
pub fn reverse(&mut self) {
self.fields.reverse();
}
diff --git a/arrow-select/src/union_extract.rs
b/arrow-select/src/union_extract.rs
index 00fe6db734..c980807289 100644
--- a/arrow-select/src/union_extract.rs
+++ b/arrow-select/src/union_extract.rs
@@ -188,7 +188,7 @@ fn extract_sparse(
Ok(make_array(data))
} else {
- // case 4.2: target can't containt a null mask, zip the
values that match with a null value
+ // case 4.2: target can't contain a null mask, zip the
values that match with a null value
Ok(crate::zip::zip(
&BooleanArray::new(selected, None),
target,
@@ -223,7 +223,7 @@ fn extract_dense(
} else if target.null_count() == target.len() ||
target.data_type().is_null() {
// case 3: since all values on our target are null, regardless of
selected type ids and offsets, the result is a null array
match target.len().cmp(&union_array.len()) {
- // case 3.1: since the target is smaller than the union, allocate
a new correclty sized null array
+ // case 3.1: since the target is smaller than the union, allocate
a new correctly sized null array
Ordering::Less => Ok(new_null_array(target.data_type(),
union_array.len())),
// case 3.2: target equals the union len, return it direcly
Ordering::Equal => Ok(Arc::clone(target)),
@@ -252,7 +252,7 @@ fn extract_dense(
// Non empty target without any selected value may happen
after slicing the parent union,
// since only type_ids and offsets are sliced, not the children
match (target.len().cmp(&union_array.len()),
layout(target.data_type()).can_contain_null_mask) {
- (Ordering::Less, _) // case 5.1A: our target is smaller
than the parent union, allocate a new correclty sized null array
+ (Ordering::Less, _) // case 5.1A: our target is smaller
than the parent union, allocate a new correctly sized null array
| (_, false) => { // case 5.1B: target array can't contain
a null mask
Ok(new_null_array(target.data_type(),
union_array.len()))
}
@@ -312,7 +312,7 @@ fn extract_dense_all_selected(
// case 2: All offsets are sequential, but our target is bigger than
our union, slice it, starting at the first offset
Ok(target.slice(offsets[0] as usize, union_array.len()))
} else {
- // case 3: Since offsets are not sequential, take them from the child
to a new sequential and correcly sized array
+ // case 3: Since offsets are not sequential, take them from the child
to a new sequential and correctly sized array
let indices = Int32Array::try_new(offsets.clone(), None)?;
Ok(take(target, &indices, None)?)
@@ -327,7 +327,7 @@ enum BoolValue {
/// If true, all type_ids matches the target type_id
/// If false, none type_ids matches the target type_id
Scalar(bool),
- /// A mask represeting which type_ids matches the target type_id
+ /// A mask representing which type_ids matches the target type_id
Buffer(BooleanBuffer),
}
diff --git a/parquet-variant/src/builder/object.rs
b/parquet-variant/src/builder/object.rs
index b5b0878652..0f6138d07d 100644
--- a/parquet-variant/src/builder/object.rs
+++ b/parquet-variant/src/builder/object.rs
@@ -758,7 +758,7 @@ mod tests {
let (metadata, value) = builder.finish();
- // note, object fields are now sorted lexigraphically by field name
+ // note, object fields are now sorted lexicographically by field name
/*
{
"a": false,
diff --git a/parquet-variant/src/utils.rs b/parquet-variant/src/utils.rs
index e935305366..10f0a5a721 100644
--- a/parquet-variant/src/utils.rs
+++ b/parquet-variant/src/utils.rs
@@ -102,7 +102,7 @@ pub(crate) fn string_from_slice(
}
/// Performs a binary search over a range using a fallible key extraction
function; a failed key
-/// extraction immediately terminats the search.
+/// extraction immediately terminates the search.
///
/// This is similar to the standard library's `binary_search_by`, but
generalized to ranges instead
/// of slices.
diff --git a/parquet-variant/src/variant.rs b/parquet-variant/src/variant.rs
index f8da6b1537..dcb81de490 100644
--- a/parquet-variant/src/variant.rs
+++ b/parquet-variant/src/variant.rs
@@ -20,7 +20,7 @@ pub use self::list::VariantList;
pub use self::metadata::{EMPTY_VARIANT_METADATA, EMPTY_VARIANT_METADATA_BYTES,
VariantMetadata};
pub use self::object::VariantObject;
-// Publically export types used in the API
+// Publicly export types used in the API
pub use half::f16;
pub use uuid::Uuid;
diff --git a/parquet-variant/src/variant/list.rs
b/parquet-variant/src/variant/list.rs
index 4066d5c10d..8d6a8e7e3c 100644
--- a/parquet-variant/src/variant/list.rs
+++ b/parquet-variant/src/variant/list.rs
@@ -157,7 +157,7 @@ impl<'m, 'v> VariantList<'m, 'v> {
Self::try_new_with_shallow_validation(metadata, value).expect("Invalid
variant list value")
}
- /// Attempts to interpet `metadata` and `value` as a variant array,
performing only basic
+ /// Attempts to interpret `metadata` and `value` as a variant array,
performing only basic
/// (constant-cost) [validation].
///
/// [validation]: Self#Validation
diff --git a/parquet-variant/src/variant/object.rs
b/parquet-variant/src/variant/object.rs
index 221eb8f1b3..9537ca2db2 100644
--- a/parquet-variant/src/variant/object.rs
+++ b/parquet-variant/src/variant/object.rs
@@ -147,7 +147,7 @@ impl<'m, 'v> VariantObject<'m, 'v> {
Self::try_new_with_shallow_validation(metadata, value).expect("Invalid
variant object")
}
- /// Attempts to interpet `metadata` and `value` as a variant object.
+ /// Attempts to interpret `metadata` and `value` as a variant object.
///
/// # Validation
///
@@ -158,7 +158,7 @@ impl<'m, 'v> VariantObject<'m, 'v> {
Self::try_new_with_shallow_validation(metadata,
value)?.with_full_validation()
}
- /// Attempts to interpet `metadata` and `value` as a variant object,
performing only basic
+ /// Attempts to interpret `metadata` and `value` as a variant object,
performing only basic
/// (constant-cost) [validation].
///
/// [validation]: Self#Validation