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 2021/12/03 03:36:35 UTC

[GitHub] [arrow-datafusion] xudong963 opened a new pull request #1395: Update rust vesion to 1.57

xudong963 opened a new pull request #1395:
URL: https://github.com/apache/arrow-datafusion/pull/1395


   # 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 #123` indicates that this PR will close issue #123.
   -->
   
   Related: https://blog.rust-lang.org/2021/12/02/Rust-1.57.0.html
   
    # 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.  
   -->
   
   # 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.
   -->
   
   # 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.
   -->
   


-- 
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



[GitHub] [arrow-datafusion] xudong963 commented on pull request #1395: Update rust vesion to 1.57

Posted by GitBox <gi...@apache.org>.
xudong963 commented on pull request #1395:
URL: https://github.com/apache/arrow-datafusion/pull/1395#issuecomment-985220750


   > @xudong963 do you want to also fix the clippy errors?
   
   Sure 😄, a little late.


-- 
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



[GitHub] [arrow-datafusion] xudong963 commented on a change in pull request #1395: Update rust vesion to 1.57

Posted by GitBox <gi...@apache.org>.
xudong963 commented on a change in pull request #1395:
URL: https://github.com/apache/arrow-datafusion/pull/1395#discussion_r761963764



##########
File path: ballista/rust/core/src/config.rs
##########
@@ -31,22 +31,22 @@ pub const BALLISTA_DEFAULT_SHUFFLE_PARTITIONS: &str = "ballista.shuffle.partitio
 #[derive(Debug, Clone)]
 pub struct ConfigEntry {
     name: String,
-    description: String,
-    data_type: DataType,
+    _description: String,

Review comment:
       Yes, very much agree with you, `_` is a conservative but useful way!




-- 
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



[GitHub] [arrow-datafusion] xudong963 commented on a change in pull request #1395: Update rust vesion to 1.57

Posted by GitBox <gi...@apache.org>.
xudong963 commented on a change in pull request #1395:
URL: https://github.com/apache/arrow-datafusion/pull/1395#discussion_r761804805



##########
File path: datafusion/src/sql/parser.rs
##########
@@ -85,7 +85,7 @@ pub struct CreateExternalTable {
 #[derive(Debug, Clone, PartialEq)]
 pub enum Statement {
     /// ANSI SQL AST node
-    Statement(SQLStatement),
+    Statement(Box<SQLStatement>),

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

##########
File path: datafusion/src/physical_plan/datetime_expressions.rs
##########
@@ -77,7 +78,10 @@ where
         })?;
 
     // first map is the iterator, second is for the `Option<_>`
-    array.iter().map(|x| x.map(|x| op(x)).transpose()).collect()
+    array

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

##########
File path: datafusion/src/scalar.rs
##########
@@ -68,7 +68,7 @@ pub enum ScalarValue {
     /// large binary
     LargeBinary(Option<Vec<u8>>),
     /// list of nested ScalarValue (boxed to reduce size_of(ScalarValue))
-    #[allow(clippy::box_vec)]
+    #[allow(clippy::box_collection)]

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




-- 
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



[GitHub] [arrow-datafusion] xudong963 commented on pull request #1395: Update rust vesion to 1.57

Posted by GitBox <gi...@apache.org>.
xudong963 commented on pull request #1395:
URL: https://github.com/apache/arrow-datafusion/pull/1395#issuecomment-985412500


   I can't find `field is never read` clippy update in https://github.com/rust-lang/rust-clippy/blob/master/CHANGELOG.md#rust-157
   
   ![8KxCTexjiN](https://user-images.githubusercontent.com/41979257/144588664-8afa0223-9273-44c9-a782-85dd21bb7ce3.png)
   
   So I still don't fix clippy errors in the screenshot.
   


-- 
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



[GitHub] [arrow-datafusion] xudong963 commented on pull request #1395: Update rust vesion to 1.57

Posted by GitBox <gi...@apache.org>.
xudong963 commented on pull request #1395:
URL: https://github.com/apache/arrow-datafusion/pull/1395#issuecomment-985486818


   > One approach we might take is add `clippy allow` lints and then go work through them one by one. I'll try and do this later today if I get to it
   
   You mean add `#[allow(dead_code)]`?


-- 
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



[GitHub] [arrow-datafusion] alamb merged pull request #1395: Update rust vesion to 1.57

Posted by GitBox <gi...@apache.org>.
alamb merged pull request #1395:
URL: https://github.com/apache/arrow-datafusion/pull/1395


   


-- 
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



[GitHub] [arrow-datafusion] alamb commented on a change in pull request #1395: Update rust vesion to 1.57

Posted by GitBox <gi...@apache.org>.
alamb commented on a change in pull request #1395:
URL: https://github.com/apache/arrow-datafusion/pull/1395#discussion_r761958621



##########
File path: datafusion/src/physical_plan/sort_preserving_merge.rs
##########
@@ -346,7 +346,7 @@ struct SortPreservingMergeStream {
     receivers: Vec<mpsc::Receiver<ArrowResult<RecordBatch>>>,
 
     /// Drop helper for tasks feeding the [`receivers`](Self::receivers)
-    drop_helper: AbortOnDropMany<()>,
+    _drop_helper: AbortOnDropMany<()>,

Review comment:
       this is used (its `drop()` impl is used) so change its name

##########
File path: datafusion/src/physical_plan/windows/built_in.rs
##########
@@ -33,28 +31,22 @@ use std::sync::Arc;
 /// A window expr that takes the form of a built in window function
 #[derive(Debug)]
 pub struct BuiltInWindowExpr {
-    fun: BuiltInWindowFunction,
     expr: Arc<dyn BuiltInWindowFunctionExpr>,
     partition_by: Vec<Arc<dyn PhysicalExpr>>,
     order_by: Vec<PhysicalSortExpr>,
-    window_frame: Option<WindowFrame>,
 }
 
 impl BuiltInWindowExpr {
     /// create a new built-in window function expression
     pub(super) fn new(
-        fun: BuiltInWindowFunction,

Review comment:
       the fun and window_frame are used to construct the `BuiltInWindowFunctionExpr` (so the don't need to be also encoded on the `BuildInWindowExpr`

##########
File path: benchmarks/src/bin/tpch.rs
##########
@@ -75,10 +75,9 @@ struct BallistaBenchmarkOpt {
     #[structopt(short = "i", long = "iterations", default_value = "3")]
     iterations: usize,
 
-    /// Batch size when reading CSV or Parquet files
-    #[structopt(short = "s", long = "batch-size", default_value = "8192")]
-    batch_size: usize,
-
+    // /// Batch size when reading CSV or Parquet files

Review comment:
       These parameters are never read (aka they don't do anything) so removing them from the CLI seemed like a reasonable thing to do

##########
File path: ballista/rust/core/src/config.rs
##########
@@ -31,22 +31,22 @@ pub const BALLISTA_DEFAULT_SHUFFLE_PARTITIONS: &str = "ballista.shuffle.partitio
 #[derive(Debug, Clone)]
 pub struct ConfigEntry {
     name: String,
-    description: String,
-    data_type: DataType,
+    _description: String,

Review comment:
       I didn't know if this was important or not to keep in ballista so rather than removing it I renamed them to start with `_` to satisfy clippy




-- 
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



[GitHub] [arrow-datafusion] alamb commented on a change in pull request #1395: Update rust vesion to 1.57

Posted by GitBox <gi...@apache.org>.
alamb commented on a change in pull request #1395:
URL: https://github.com/apache/arrow-datafusion/pull/1395#discussion_r761958448



##########
File path: datafusion/src/physical_plan/expressions/average.rs
##########
@@ -37,8 +37,8 @@ use super::{format_state_name, sum};
 #[derive(Debug)]
 pub struct Avg {
     name: String,
+    #[allow(dead_code)]

Review comment:
       I will look into removing this field as well




-- 
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



[GitHub] [arrow-datafusion] xudong963 commented on pull request #1395: Update rust vesion to 1.57

Posted by GitBox <gi...@apache.org>.
xudong963 commented on pull request #1395:
URL: https://github.com/apache/arrow-datafusion/pull/1395#issuecomment-985555945


   Nice, clippy passed😄


-- 
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



[GitHub] [arrow-datafusion] xudong963 commented on a change in pull request #1395: Update rust vesion to 1.57

Posted by GitBox <gi...@apache.org>.
xudong963 commented on a change in pull request #1395:
URL: https://github.com/apache/arrow-datafusion/pull/1395#discussion_r762022067



##########
File path: datafusion/src/physical_plan/expressions/average.rs
##########
@@ -69,10 +67,14 @@ impl Avg {
         name: impl Into<String>,
         data_type: DataType,
     ) -> Self {
+        // Average is always Float64, but Avg::new() has a data_type
+        // parameter to keep a consistent signature with the other
+        // Aggregate expressions.
+        assert_eq!(data_type, DataType::Float64);

Review comment:
       👍
   




-- 
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



[GitHub] [arrow-datafusion] alamb commented on pull request #1395: Update rust vesion to 1.57

Posted by GitBox <gi...@apache.org>.
alamb commented on pull request #1395:
URL: https://github.com/apache/arrow-datafusion/pull/1395#issuecomment-986014080


   Thanks again @xudong963.


-- 
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



[GitHub] [arrow-datafusion] houqp commented on pull request #1395: Update rust vesion to 1.57

Posted by GitBox <gi...@apache.org>.
houqp commented on pull request #1395:
URL: https://github.com/apache/arrow-datafusion/pull/1395#issuecomment-985219592


   @xudong963 do you want to also fix the clippy errors?


-- 
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



[GitHub] [arrow-datafusion] alamb commented on a change in pull request #1395: Update rust vesion to 1.57

Posted by GitBox <gi...@apache.org>.
alamb commented on a change in pull request #1395:
URL: https://github.com/apache/arrow-datafusion/pull/1395#discussion_r762058098



##########
File path: datafusion/src/physical_plan/expressions/average.rs
##########
@@ -37,8 +37,8 @@ use super::{format_state_name, sum};
 #[derive(Debug)]
 pub struct Avg {
     name: String,
+    #[allow(dead_code)]

Review comment:
       I think you are right 




-- 
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



[GitHub] [arrow-datafusion] capkurmagati commented on a change in pull request #1395: Update rust vesion to 1.57

Posted by GitBox <gi...@apache.org>.
capkurmagati commented on a change in pull request #1395:
URL: https://github.com/apache/arrow-datafusion/pull/1395#discussion_r762000253



##########
File path: datafusion/src/physical_plan/expressions/average.rs
##########
@@ -37,8 +37,8 @@ use super::{format_state_name, sum};
 #[derive(Debug)]
 pub struct Avg {
     name: String,
+    #[allow(dead_code)]

Review comment:
       This PR might be the reason causes the different behavior on `dead_code`. 
   https://github.com/rust-lang/rust/pull/85200




-- 
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



[GitHub] [arrow-datafusion] alamb commented on pull request #1395: Update rust vesion to 1.57

Posted by GitBox <gi...@apache.org>.
alamb commented on pull request #1395:
URL: https://github.com/apache/arrow-datafusion/pull/1395#issuecomment-985541682


   @xudong963  I pushed a few changes to this branch to try and get clippy to pass. Here's hoping we get a clean run


-- 
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



[GitHub] [arrow-datafusion] alamb commented on a change in pull request #1395: Update rust vesion to 1.57

Posted by GitBox <gi...@apache.org>.
alamb commented on a change in pull request #1395:
URL: https://github.com/apache/arrow-datafusion/pull/1395#discussion_r761870564



##########
File path: datafusion/src/scalar.rs
##########
@@ -68,7 +68,7 @@ pub enum ScalarValue {
     /// large binary
     LargeBinary(Option<Vec<u8>>),
     /// list of nested ScalarValue (boxed to reduce size_of(ScalarValue))
-    #[allow(clippy::box_vec)]
+    #[allow(clippy::box_collection)]

Review comment:
       Oh clippy, how wrong you are :)
   
   the benefit is that the overall enum is smaller (as in the size of `Vec<ScalarValue>` is like 3 pointers (24 bytes) but a `Box<Vec<ScalarValue>>` is 8 bytes
   
   




-- 
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