You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/01/14 02:38:37 UTC

[GitHub] [arrow-datafusion] xudong963 commented on a change in pull request #1557: Update to rust 1.58

xudong963 commented on a change in pull request #1557:
URL: https://github.com/apache/arrow-datafusion/pull/1557#discussion_r784469111



##########
File path: datafusion/src/physical_plan/file_format/parquet.rs
##########
@@ -320,12 +320,8 @@ macro_rules! get_min_max_values {
         };
 
         let data_type = field.data_type();
-        let null_scalar: ScalarValue = if let Ok(v) = data_type.try_into() {
-            v
-        } else {
-            // DataFusion doesn't have support for ScalarValues of the column type
-            return None
-        };
+        // The result may be None, because DataFusion doesn't have support for ScalarValues of the column type
+        let null_scalar: ScalarValue = data_type.try_into().ok()?;

Review comment:
       https://rust-lang.github.io/rust-clippy/master/index.html#question_mark

##########
File path: datafusion/src/scalar.rs
##########
@@ -1739,7 +1739,7 @@ impl fmt::Display for ScalarValue {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         match self {
             ScalarValue::Decimal128(v, p, s) => {
-                write!(f, "{}", format!("{:?},{:?},{:?}", v, p, s))?;
+                write!(f, "{:?},{:?},{:?}", v, p, s)?;

Review comment:
       https://rust-lang.github.io/rust-clippy/master/index.html#format_in_format_args

##########
File path: ballista/rust/scheduler/src/planner.rs
##########
@@ -293,7 +293,7 @@ mod test {
             .plan_query_stages(&job_uuid.to_string(), plan)
             .await?;
         for stage in &stages {
-            println!("{}", displayable(stage.as_ref()).indent().to_string());
+            println!("{}", displayable(stage.as_ref()).indent());

Review comment:
       https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args

##########
File path: datafusion/src/physical_plan/expressions/rank.rs
##########
@@ -39,32 +39,32 @@ pub struct Rank {
 
 #[derive(Debug, Copy, Clone)]
 pub(crate) enum RankType {
-    Rank,
-    DenseRank,
-    PercentRank,
+    Basic,

Review comment:
       https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org