Repository navigation
Conversation
38 tasks done
Jefffrey
approved these changes
Nov 29, 2025
Contributor
|
Thanks @carlosahs |
shashidhar-bm
pushed a commit
to shashidhar-bm/datafusion
that referenced
this pull request
Dec 1, 2025
…e#18986) ## Which issue does this PR close? <!-- We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes apache#123` indicates that this PR will close issue apache#123. --> - Part of apache#18881. ## Rationale for this change <!-- Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed. Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes. --> > #[expect] attributes suppress the lint emission, but emit a warning, if the expectation is unfulfilled. This can be useful to be notified when the lint is no longer triggered. > \- https://rust-lang.github.io/rust-clippy/master/index.html?search=clippy%3A%3Aupper_case_acronyms This is helpful to identify when the lint is no longer needed across `functions-*` crates. ## What changes are included in this PR? <!-- There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR. --> Added `#![deny(clippy::allow_attributes)]` to all `functions-*` crates. Also, the following lints are removed: + [`clippy::upper_case_acronyms`](https://rust-lang.github.io/rust-clippy/master/index.html?search=clippy%3A%3Aupper_case_acronyms) is removed for https://github.com/apache/datafusion/blob/487de9db6a546671011d28540ec639d4cf212288/datafusion/functions-aggregate/src/regr.rs#L88-L129 because it resulted in ``` warning: this lint expectation is unfulfilled --> datafusion/functions-aggregate/src/regr.rs:89:10 | 89 | #[expect(clippy::upper_case_acronyms)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(unfulfilled_lint_expectations)]` on by default warning: `datafusion-functions-aggregate` (lib) generated 1 warning ``` The rationale is the following: The default value of `avoid-breaking-exported-api` is `true` so lint is suppressed. [Ref](https://github.com/rust-lang/rust-clippy/blob/92b4b68683249c781c3acad742fc6e57c4140ad9/clippy_lints/src/upper_case_acronyms.rs#L128-L132). Setting `avoid-breaking-exported-api` to `false` raises multiple warnings as datafusion does not strictly follow [`UpperCamelCase` naming convention](https://rust-lang.github.io/api-guidelines/naming.html#casing-conforms-to-rfc-430-c-case). + [`clippy::too_many_arguments`](https://rust-lang.github.io/rust-clippy/master/index.html?search=clippy%3A%3Atoo_many_arguments#too_many_arguments) is removed for https://github.com/apache/datafusion/blob/487de9db6a546671011d28540ec639d4cf212288/datafusion/functions/src/regex/regexpinstr.rs#L289-L297 as default value of `too-many-arguments-threshold` is 7 and `regexp_instr_inner` takes on 6 arguments. + [`rustdoc::redundant_explicit_links`](https://doc.rust-lang.org/rustdoc/lints.html#redundant_explicit_links) is removed for (1) https://github.com/apache/datafusion/blob/487de9db6a546671011d28540ec639d4cf212288/datafusion/functions/src/macros.rs#L79-L104 and (2) https://github.com/apache/datafusion/blob/487de9db6a546671011d28540ec639d4cf212288/datafusion/functions/src/macros.rs#L106-L120 as it looks like computed automatic link for ``[`ScalarUDF`](datafusion_expr::ScalarUDF)`` is not the same as the explicit link. Any concerns with this one? + [`rustdoc::private_intra_doc_links`](https://doc.rust-lang.org/rustdoc/lints.html#private_intra_doc_links) is removed for (1) https://github.com/apache/datafusion/blob/487de9db6a546671011d28540ec639d4cf212288/datafusion/functions-aggregate/src/approx_percentile_cont.rs#L242-L281 and (2) https://github.com/apache/datafusion/blob/487de9db6a546671011d28540ec639d4cf212288/datafusion/functions-aggregate/src/approx_percentile_cont_with_weight.rs#L254-L259 since lint detects when [intra-doc links](https://doc.rust-lang.org/rustdoc/write-documentation/linking-to-items-by-name.html) from public to private items but `TDigest::to_scalar_state()` is public, so we have the opposite case: from private to public items. ## Are these changes tested? <!-- We typically require tests for all PRs in order to: 1. Prevent the code from being accidentally broken by subsequent changes 2. Serve as another way to document the expected behavior of the code If tests are not included in your PR, please explain why (for example, are they covered by existing tests)? --> + Ran `sh ci/scripts/rust_docs.sh` with no warnings/errors. + Ran `sh ci/scripts/rust_clippy.sh` with no warnings/errors. ## Are there any user-facing changes? <!-- If there are user-facing changes then we may require documentation to be updated before approving the PR. --> <!-- If there are any breaking changes to public APIs, please add the `api change` label. --> No.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
clippy::allow_attributes#18881.Rationale for this change
This is helpful to identify when the lint is no longer needed across
functions-*crates.What changes are included in this PR?
Added
#![deny(clippy::allow_attributes)]to allfunctions-*crates. Also, the following lints are removed:clippy::upper_case_acronymsis removed fordatafusion/datafusion/functions-aggregate/src/regr.rs
Lines 88 to 129 in 487de9d
avoid-breaking-exported-apiistrueso lint is suppressed. Ref. Settingavoid-breaking-exported-apitofalseraises multiple warnings as datafusion does not strictly followUpperCamelCasenaming convention.clippy::too_many_argumentsis removed fordatafusion/datafusion/functions/src/regex/regexpinstr.rs
Lines 289 to 297 in 487de9d
too-many-arguments-thresholdis 7 andregexp_instr_innertakes on 6 arguments.rustdoc::redundant_explicit_linksis removed for (1)datafusion/datafusion/functions/src/macros.rs
Lines 79 to 104 in 487de9d
datafusion/datafusion/functions/src/macros.rs
Lines 106 to 120 in 487de9d
[`ScalarUDF`](datafusion_expr::ScalarUDF)is not the same as the explicit link. Any concerns with this one?rustdoc::private_intra_doc_linksis removed for (1)datafusion/datafusion/functions-aggregate/src/approx_percentile_cont.rs
Lines 242 to 281 in 487de9d
datafusion/datafusion/functions-aggregate/src/approx_percentile_cont_with_weight.rs
Lines 254 to 259 in 487de9d
TDigest::to_scalar_state()is public, so we have the opposite case: from private to public items.Are these changes tested?
sh ci/scripts/rust_docs.shwith no warnings/errors.sh ci/scripts/rust_clippy.shwith no warnings/errors.Are there any user-facing changes?
No.