-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
base: main
Are you sure you want to change the base?
Conversation
7b29518
to
f171994
Compare
eca1415
to
33b8aad
Compare
@@ -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(); |
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.
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>> { |
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.
lifetime added
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, |
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.
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 |
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.
doc cleanup (redundant link target removed)
if r.is_ok() { | ||
val = Some(Ok(op2(r.unwrap()))); | ||
if let Ok(inner) = r { | ||
val = Some(Ok(op2(inner))); |
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.
simplified is_ok() + unwrap()
to if let Some(...) =
#[allow(rustdoc::redundant_explicit_links)] | ||
#[doc = concat!("Return a [`ScalarUDF`](datafusion_expr::ScalarUDF) implementation of ", stringify!($NAME))] |
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.
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 { |
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.
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 { |
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.
simplified result.is_ok() + unwrap()
to if let Some(return_field) = return_field {
Err(expected_error) => { | ||
if let Err(error) = &return_field { |
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.
simplified return_field.is_err() + unwrap()
to if let Err(error) = &return_field {
Err(expected_error) => { | ||
if let Ok(return_field) = return_field { |
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.
simplified return_field.is_err()
+ unwrap()
to if let Err(error) = &return_field {
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.
Thanks @shruti2522 for adapting the project to 1.89
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.
Are these changes tested?
No warnings/errors detected
Are there any user-facing changes?