Skip to content

Update workspace to use Rust 1.89 #17100

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

shruti2522
Copy link
Contributor

@shruti2522 shruti2522 commented Aug 8, 2025

Which issue does this PR close?

Rationale for this change

What changes are included in this PR?

fixed all clippy warnings, here are the major ones:
1.
Screenshot from 2025-08-12 01-44-34

Screenshot from 2025-08-12 01-10-56
Screenshot from 2025-08-12 01-49-04

Are these changes tested?

No warnings/errors detected

Are there any user-facing changes?

@github-actions github-actions bot added sql SQL Planner logical-expr Logical plan and expressions physical-expr Changes to the physical-expr crates optimizer Optimizer rules core Core DataFusion crate catalog Related to the catalog crate common Related to common crate proto Related to proto crate functions Changes to functions implementation datasource Changes to the datasource crate physical-plan Changes to the physical-plan crate labels Aug 8, 2025
@shruti2522 shruti2522 marked this pull request as draft August 8, 2025 22:17
@github-actions github-actions bot added the spark label Aug 10, 2025
@github-actions github-actions bot added execution Related to the execution crate and removed execution Related to the execution crate labels Aug 10, 2025
@github-actions github-actions bot added sqllogictest SQL Logic Tests (.slt) execution Related to the execution crate labels Aug 11, 2025
@github-actions github-actions bot removed sqllogictest SQL Logic Tests (.slt) execution Related to the execution crate labels Aug 11, 2025
@@ -313,7 +313,7 @@ impl Display for ParquetMetadataIndex {
"ParquetMetadataIndex(last_num_pruned: {})",
self.last_num_pruned()
)?;
let batches = pretty_format_batches(&[self.index.clone()]).unwrap();
let batches = pretty_format_batches(std::slice::from_ref(&self.index)).unwrap();
Copy link
Contributor Author

@shruti2522 shruti2522 Aug 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

slice fix (std::slice::from_ref)

@@ -71,7 +71,7 @@ impl TableProvider for CteWorkTable {
self
}

fn get_logical_plan(&self) -> Option<Cow<LogicalPlan>> {
fn get_logical_plan(&'_ self) -> Option<Cow<'_, LogicalPlan>> {
Copy link
Contributor Author

@shruti2522 shruti2522 Aug 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lifetime added

Comment on lines -240 to +244
if coerce_int96.is_some() {
if let Some(ref coerce) = coerce_int96 {
if let Some(merged) = coerce_int96_to_resolution(
reader_metadata.parquet_schema(),
&physical_file_schema,
&(coerce_int96.unwrap()),
coerce,
Copy link
Contributor Author

@shruti2522 shruti2522 Aug 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

simplified is_some() + unwrap() to if let Some(...) =

@@ -49,7 +49,7 @@ use datafusion_physical_plan::ExecutionPlan;
/// [`CatalogProvider`]: super::CatalogProvider
#[async_trait]
pub trait TableProvider: Debug + Sync + Send {
/// Returns the table provider as [`Any`](std::any::Any) so that it can be
/// Returns the table provider as [`Any`] so that it can be
Copy link
Contributor Author

@shruti2522 shruti2522 Aug 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doc cleanup (redundant link target removed)

Comment on lines -415 to +416
if r.is_ok() {
val = Some(Ok(op2(r.unwrap())));
if let Ok(inner) = r {
val = Some(Ok(op2(inner)));
Copy link
Contributor Author

@shruti2522 shruti2522 Aug 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

simplified is_ok() + unwrap() to if let Some(...) =

Comment on lines +76 to 77
#[allow(rustdoc::redundant_explicit_links)]
#[doc = concat!("Return a [`ScalarUDF`](datafusion_expr::ScalarUDF) implementation of ", stringify!($NAME))]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

used #[allow(rustdoc::redundant_explicit_links)] to supress the warnings beacuse the macro is used in places where ScalarUDF is sometimes already imported, making the full path redundant and sometimes not requiring the full path, causing conflicting doc link warnings.

let array = if fill_array.is_none() {
let array = if let Some(fill_array) = fill_array {
Copy link
Contributor Author

@shruti2522 shruti2522 Aug 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

simplified fill_array.is_none() + unwrap() to if let Some(fill_array) = fill_array {

config_options: $CONFIG_OPTIONS,
});
assert_eq!(result.is_ok(), true, "function returned an error: {}", result.unwrap_err());
if let Ok(return_field) = return_field {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

simplified result.is_ok() + unwrap() to if let Some(return_field) = return_field {

Comment on lines +106 to +107
Err(expected_error) => {
if let Err(error) = &return_field {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

simplified return_field.is_err() + unwrap() to if let Err(error) = &return_field {

Comment on lines +197 to +198
Err(expected_error) => {
if let Ok(return_field) = return_field {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

simplified return_field.is_err() + unwrap() to if let Err(error) = &return_field {

@shruti2522 shruti2522 marked this pull request as ready for review August 11, 2025 20:25
Copy link
Contributor

@comphead comphead left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @shruti2522 for adapting the project to 1.89

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
catalog Related to the catalog crate common Related to common crate core Core DataFusion crate datasource Changes to the datasource crate functions Changes to functions implementation logical-expr Logical plan and expressions optimizer Optimizer rules physical-expr Changes to the physical-expr crates physical-plan Changes to the physical-plan crate proto Related to proto crate spark sql SQL Planner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update workspace to use Rust 1.89
2 participants