-
Notifications
You must be signed in to change notification settings - Fork 1.6k
chore: fix typos #17135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
chore: fix typos #17135
Conversation
Signed-off-by: Ruihang Xia <[email protected]>
Signed-off-by: Ruihang Xia <[email protected]>
Signed-off-by: Ruihang Xia <[email protected]>
Signed-off-by: Ruihang Xia <[email protected]>
Signed-off-by: Ruihang Xia <[email protected]>
Signed-off-by: Ruihang Xia <[email protected]>
Signed-off-by: Ruihang Xia <[email protected]>
Signed-off-by: Ruihang Xia <[email protected]>
Signed-off-by: Ruihang Xia <[email protected]>
Signed-off-by: Ruihang Xia <[email protected]>
typos.toml
Outdated
alph = "alph" | ||
wih = "wih" | ||
Ded = "Ded" | ||
Serializeable = "Serializeable" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a public interface so I added it to allowlist
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the checker have a way to exclude given work at given use place? or only global excludes are available?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can specify the scope https://github.com/crate-ci/typos#false-positives. This might be useful to those from test text.
typos.toml
Outdated
Pn = "Pn" | ||
fo = "fo" | ||
flate = "flate" | ||
nd = "nd" | ||
Nd = "Nd" | ||
YOUY = "YOUY" | ||
typ = "typ" | ||
ba = "ba" | ||
lits = "lits" | ||
ECT = "ECT" | ||
Ue = "Ue" | ||
Iy = "Iy" | ||
hte = "hte" | ||
numer = "numer" | ||
abd = "abd" | ||
aroun = "aroun" | ||
carefull = "carefull" | ||
abov = "abov" | ||
Ois = "Ois" | ||
alo = "alo" | ||
precentage = "precentage" | ||
datas = "datas" | ||
hom = "hom" | ||
alph = "alph" | ||
wih = "wih" | ||
Ded = "Ded" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of them are from tests or benchmarks
Signed-off-by: Ruihang Xia <[email protected]>
Signed-off-by: Ruihang Xia <[email protected]>
.github/workflows/rust.yml
Outdated
name: Spell Check with Typos | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pin to a fixed revision to prevent it from breaking unexpectedly because of a dictionary update. And use an unversioned new commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if "unversioned new commit." is something not released yet, then let's please use a tagged version
See also #17046 (comment)
I believe there is no good reason to pin precise commits for GitHub's own internal actions such as actions/checkout
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM , thank you @waynexia , very good improvement to me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love it! ❤️
This PR is quite a lot of changes.
Could you please send typo fixes in PR separate from spellchecker workflow?
Typo fixes require low scrutiny (mostly checks for API components), which is different from GH actions.
.github/workflows/rust.yml
Outdated
name: Spell Check with Typos | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if "unversioned new commit." is something not released yet, then let's please use a tagged version
See also #17046 (comment)
I believe there is no good reason to pin precise commits for GitHub's own internal actions such as actions/checkout
.
.github/workflows/rust.yml
Outdated
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | ||
with: | ||
persist-credentials: false | ||
- uses: crate-ci/typos@master |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a 3rd party action maintained at https://github.com/crate-ci/typos?
Is it already ASF approved?
If yes, this must pin to a particular commit hash.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
find it https://github.com/apache/infrastructure-actions/blob/4b7c80ef656dd3a147546ac60c4e10c0285f0927/approved_patterns.yml#L82. I'll use a version (or hash) in the follow up PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool file! Is there ASF-maintained workflow or action to validate our workflows using the approved_patterns file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or maybe it's already the case (as suggested by https://github.com/apache/infrastructure-actions/tree/4b7c80ef656dd3a147546ac60c4e10c0285f0927?tab=readme-ov-file#management-of-organization-wide-github-actions-allow-list)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not very sure about this part... actually I doubt how this is enforced 🙈
Signed-off-by: Ruihang Xia <[email protected]>
Thank you! I removed the job from this PR. I'll check if it's permitted while waiting for this PR to merge, and file another one dedicated for the checker |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM % few places.
@@ -403,7 +403,7 @@ async fn run_aggregate_test(input1: Vec<RecordBatch>, group_by_columns: Vec<&str | |||
Left Plan:\n{}\n\ | |||
Right Plan:\n{}\n\ | |||
schema:\n{schema}\n\ | |||
Left Ouptut:\n{}\n\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
@@ -192,13 +192,14 @@ impl AsyncFuncExpr { | |||
); | |||
} | |||
|
|||
let datas = ColumnarValue::values_to_arrays(&result_batches)? | |||
let data_vec = ColumnarValue::values_to_arrays(&result_batches)? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is no such word datas
, but it's likely as meaningful as data_vec
it could be allowed (no need to change anything)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I then found there are many datas
so I added it to the allowlist... will revert this as well
@@ -173,15 +173,15 @@ impl SpillMetrics { | |||
#[derive(Debug, Clone)] | |||
pub struct SplitMetrics { | |||
/// Number of times an input [`RecordBatch`] was split | |||
pub batches_splitted: Count, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like an api change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahh yes. Do we need to extract a dedicated PR for breaking changes? (this one and the ignored Serializeable
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i don't think we need a dedicated PR. We could add a note in the upgrade guide.
Given that these are such small changes, maybe just adding the api-change
label so they are highlighted in the release notes would be good enough
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, I also added a note to PR description 👍
#[case::missing_assignment_target("UPDATE person SET doesnotexist = true")] | ||
#[case::missing_assignment_expression("UPDATE person SET age = doesnotexist + 42")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was clearly a typo. In rstest
? In our code? Did it work, or should we just delete these lines?
I would feel better if this change is backed out from this PR, because I don't understand its consequences
#[case::missing_assignment_target("UPDATE person SET doesnotexist = true")] | |
#[case::missing_assignment_expression("UPDATE person SET age = doesnotexist + 42")] | |
#[case::missing_assignement_target("UPDATE person SET doesnotexist = true")] | |
#[case::missing_assignement_expression("UPDATE person SET age = doesnotexist + 42")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typos.toml
Outdated
nd = "nd" | ||
Nd = "Nd" | ||
YOUY = "YOUY" | ||
typ = "typ" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is perhaps fine as type
is reserved. worth adding a comment line that typ
stands for type
typos.toml
Outdated
numer = "numer" | ||
abd = "abd" | ||
aroun = "aroun" | ||
carefull = "carefull" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
most of these words are either typos, or some arbitrary abbreviations.
Let's not add this file in this PR.
Let's add it in a PR that adds the checking workflow.
typos.toml
Outdated
alph = "alph" | ||
wih = "wih" | ||
Ded = "Ded" | ||
Serializeable = "Serializeable" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the checker have a way to exclude given work at given use place? or only global excludes are available?
Is this one ready to merge? It looks like there are some conflicts to resolve and some unresolved comments |
Yes it's close. I'll address conflicts and comments tomorrow. Got some issues connecting to my server now 🥲 |
Signed-off-by: Ruihang Xia <[email protected]>
Signed-off-by: Ruihang Xia <[email protected]>
Signed-off-by: Ruihang Xia <[email protected]>
Co-authored-by: Piotr Findeisen <[email protected]>
Co-authored-by: Piotr Findeisen <[email protected]>
Signed-off-by: Ruihang Xia <[email protected]>
Signed-off-by: Ruihang Xia [email protected]## Which issue does this PR close?
date_trunc
(~7x faster) in some cases #16859 (comment)Rationale for this change
From #16859 (comment), then I think why not add an automatic checker
What changes are included in this PR?
A typo checker, and fix all existing typos (or allowlist them). It runs like https://github.com/waynexia/arrow-datafusion/actions/runs/16897471061/job/47869907355
Are these changes tested?
no
Are there any user-facing changes?
API change:
SplitMetrics::batches_splitted
field is renamed toSplitMetrics::batches_split
(grammar typo #17135 (comment))