Skip to content

Commit a5c809f

Browse files
chore: Fix duplicated word typos in comments and docs (#25048)
## Which issue does this PR close? No issue. This follows the precedent of prior comment-typo cleanups, which were merged without a linked issue: - #23662 `chore: Fix duplicated word typos in comments` (10 files, +14/-14) - #21495 ``chore: Fix `typo` problems`` (10 files, +14/-14) - #22625 `chore: Fix typos in comments` (2 files, +2/-2) - #22524 `chore: fix two comment typos` (2 files, +4/-4) - #20157 `chore: Fix typos in comments` (1 file, +2/-2) ## Rationale for this change Several comments and doc comments contain accidentally doubled words — `the sort sort options`, `can not not vary`, `types types from`. Four of them are rustdoc on public methods, so they render on docs.rs. These survive automated checking because the CI typo checker (`ci/scripts/typos_check.sh`, the `typos` crate) matches misspelled *words* and does not detect a correctly spelled word repeated twice in a row. Searching the tree for `\b(\w+)\s+\1\b` restricted to comment and prose lines finds the cases below; the remaining matches are ASCII-art plan diagrams and pasted `parquet-tools` output, which are left alone. ## What changes are included in this PR? Removes 7 doubled words across 6 Rust files and 1 documentation file (13 lines). Comment and prose text only — no code changes. | File | Fix | | --- | --- | | `datafusion/physical-expr-common/src/sort_expr.rs` (x4) | `Set the sort sort options` on the public `asc` / `desc` / `nulls_first` / `nulls_last` builders | | `datafusion/core/src/datasource/file_format/options.rs` (x4) | `can not not vary from statement to statement` on the CSV / Parquet / Arrow / Avro read options | | `datafusion/expr/src/window_frame.rs` | `equivalent values for all all terms` | | `datafusion/expr/src/logical_plan/plan.rs` | `properly infer types types from literal values` | | `datafusion/physical-plan/src/repartition/distributor_channels.rs` | `so we we can safely assume` | | `datafusion-examples/examples/query_planning/expr_api.rs` | `The same same expression` | | `docs/source/contributor-guide/testing.md` | `you can run them them locally` | ## What is the testing strategy for this PR? 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.97.0 toolchain: - `cargo fmt --all --check` — pass - `cargo clippy --all-targets --all-features -- -D warnings` — pass, no warnings (full workspace, 22m) - `./ci/scripts/doc_prettier_check.sh` — pass - `cargo test --doc -p datafusion-physical-expr-common -p datafusion-expr -p datafusion` — pass, 254 tests (186 + 60 + 8), 0 failed I did not run the full extended test suite. No edited comment contains a doctest code fence, and the workspace compiles cleanly under `--all-features`, so the change cannot affect compiled or tested behaviour. ## Are there any user-facing changes? No API or behaviour changes. The rendered rustdoc for four public `PhysicalSortExpr` builder methods and for the four `*ReadOptions` structs is corrected. --- ## AI disclosure This contribution was AI-assisted. Claude Code (Claude Opus 5) performed the tree-wide doubled-word search, made the 13 line edits, and ran every check listed above on Linux x86_64 with the pinned 1.97.0 toolchain. The contributor reviewed the diff and the check output before this PR was opened; the check commands themselves were executed by the AI and were not independently re-run by hand. The two `datafusion/core/src/lib.rs` doctests initially failed for a missing `parquet-testing` submodule (`PARQUET_TEST_DATA` undefined) rather than for any change in this PR; they pass once the submodule is initialised. That file is not touched by this PR. Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
1 parent b39cb4a commit a5c809f

7 files changed

Lines changed: 13 additions & 13 deletions

File tree

‎datafusion-examples/examples/query_planning/expr_api.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ pub fn expr_api() -> Result<()> {
6363
// "fluent"-style API:
6464
let expr = col("a") + lit(5);
6565

66-
// The same same expression can be created directly, with much more code:
66+
// The same expression can be created directly, with much more code:
6767
let expr2 = Expr::BinaryExpr(BinaryExpr::new(
6868
Box::new(col("a")),
6969
Operator::Plus,

‎datafusion/core/src/datasource/file_format/options.rs‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ use futures::future::BoxFuture;
5050
/// Options that control the reading of CSV files.
5151
///
5252
/// Note this structure is supplied when a datasource is created and
53-
/// can not not vary from statement to statement. For settings that
53+
/// can not vary from statement to statement. For settings that
5454
/// can vary statement to statement see
5555
/// [`ConfigOptions`](crate::config::ConfigOptions).
5656
#[derive(Clone)]
@@ -246,7 +246,7 @@ impl<'a> CsvReadOptions<'a> {
246246
/// Options that control the reading of Parquet files.
247247
///
248248
/// Note this structure is supplied when a datasource is created and
249-
/// can not not vary from statement to statement. For settings that
249+
/// can not vary from statement to statement. For settings that
250250
/// can vary statement to statement see
251251
/// [`ConfigOptions`](crate::config::ConfigOptions).
252252
#[derive(Clone)]
@@ -357,7 +357,7 @@ impl<'a> ParquetReadOptions<'a> {
357357
/// Options that control the reading of ARROW files.
358358
///
359359
/// Note this structure is supplied when a datasource is created and
360-
/// can not not vary from statement to statement. For settings that
360+
/// can not vary from statement to statement. For settings that
361361
/// can vary statement to statement see
362362
/// [`ConfigOptions`](crate::config::ConfigOptions).
363363
#[derive(Clone)]
@@ -403,7 +403,7 @@ impl<'a> ArrowReadOptions<'a> {
403403
/// Options that control the reading of AVRO files.
404404
///
405405
/// Note this structure is supplied when a datasource is created and
406-
/// can not not vary from statement to statement. For settings that
406+
/// can not vary from statement to statement. For settings that
407407
/// can vary statement to statement see
408408
/// [`ConfigOptions`](crate::config::ConfigOptions).
409409
#[derive(Clone)]

‎datafusion/expr/src/logical_plan/plan.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1787,7 +1787,7 @@ impl LogicalPlan {
17871787
/// updated according to the new parameters.
17881788
///
17891789
/// Unlike `recompute_schema()`, this method rebuilds VALUES plans entirely to properly infer
1790-
/// types types from literal values after placeholder substitution.
1790+
/// types from literal values after placeholder substitution.
17911791
fn update_schema_data_type(self) -> Result<LogicalPlan> {
17921792
match self {
17931793
// Build `LogicalPlan::Values` from the values for type inference.

‎datafusion/expr/src/window_frame.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ pub enum WindowFrameUnits {
475475
Range,
476476
/// The GROUPS frame type means that the starting and ending boundaries are determine
477477
/// by counting "groups" relative to the current group. A "group" is a set of rows that all have
478-
/// equivalent values for all all terms of the window ORDER BY clause.
478+
/// equivalent values for all terms of the window ORDER BY clause.
479479
Groups,
480480
}
481481

‎datafusion/physical-expr-common/src/sort_expr.rs‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,25 +104,25 @@ impl PhysicalSortExpr {
104104
result
105105
}
106106

107-
/// Set the sort sort options to ASC
107+
/// Set the sort options to ASC
108108
pub fn asc(mut self) -> Self {
109109
self.options.descending = false;
110110
self
111111
}
112112

113-
/// Set the sort sort options to DESC
113+
/// Set the sort options to DESC
114114
pub fn desc(mut self) -> Self {
115115
self.options.descending = true;
116116
self
117117
}
118118

119-
/// Set the sort sort options to NULLS FIRST
119+
/// Set the sort options to NULLS FIRST
120120
pub fn nulls_first(mut self) -> Self {
121121
self.options.nulls_first = true;
122122
self
123123
}
124124

125-
/// Set the sort sort options to NULLS LAST
125+
/// Set the sort options to NULLS LAST
126126
pub fn nulls_last(mut self) -> Self {
127127
self.options.nulls_first = false;
128128
self

‎datafusion/physical-plan/src/repartition/distributor_channels.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ impl<T> Drop for DistributionSender<T> {
161161
// During the shutdown of a empty channel, both the sender and the receiver side will be dropped. However we
162162
// only want to decrement the "empty channels" counter once.
163163
//
164-
// We are within a critical section here, so we we can safely assume that either the last sender or the
164+
// We are within a critical section here, so we can safely assume that either the last sender or the
165165
// receiver (there's only one) will be dropped first.
166166
//
167167
// If the last sender is dropped first, `state.data` will still exists and the sender side decrements the

‎docs/source/contributor-guide/testing.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ contributions. Kudos to [@2010YOUY01] for the initial implementation.
164164
## Documentation Examples
165165

166166
We use Rust [doctest] to verify examples from the documentation are correct and
167-
up-to-date. These tests are run as part of our CI and you can run them them
167+
up-to-date. These tests are run as part of our CI and you can run them
168168
locally with the following command:
169169

170170
```shell

0 commit comments

Comments
 (0)