-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Update rust vesion to 1.57 #1395
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
Conversation
|
@xudong963 do you want to also fix the clippy errors? |
Sure 😄, a little late. |
4e5fcbf to
9e893dc
Compare
9e893dc to
bff569b
Compare
| LargeBinary(Option<Vec<u8>>), | ||
| /// list of nested ScalarValue (boxed to reduce size_of(ScalarValue)) | ||
| #[allow(clippy::box_vec)] | ||
| #[allow(clippy::box_collection)] |
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.
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.
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
|
|
||
| // first map is the iterator, second is for the `Option<_>` | ||
| array.iter().map(|x| x.map(|x| op(x)).transpose()).collect() | ||
| 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.
| pub enum Statement { | ||
| /// ANSI SQL AST node | ||
| Statement(SQLStatement), | ||
| Statement(Box<SQLStatement>), |
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.
bff569b to
30dd9c9
Compare
|
I can't find So I still don't fix clippy errors in the screenshot. |
alamb
left a comment
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.
Thank you @xudong963 -- there are still a few clippy failures https://github.com/apache/arrow-datafusion/runs/4406965470?check_suite_focus=true
They mostly look related to "fields not read" and some of that is surprising to me (like perhaps we have some missing functionality that needs to be fleshed out).
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
| LargeBinary(Option<Vec<u8>>), | ||
| /// list of nested ScalarValue (boxed to reduce size_of(ScalarValue)) | ||
| #[allow(clippy::box_vec)] | ||
| #[allow(clippy::box_collection)] |
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.
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
You mean add |
|
@xudong963 I pushed a few changes to this branch to try and get clippy to pass. Here's hoping we get a clean run |
| #[derive(Debug)] | ||
| pub struct Avg { | ||
| name: String, | ||
| #[allow(dead_code)] |
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.
I will look into removing this field as well
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.
This PR might be the reason causes the different behavior on dead_code.
rust-lang/rust#85200
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.
I think you are right
|
|
||
| /// Drop helper for tasks feeding the [`receivers`](Self::receivers) | ||
| drop_helper: AbortOnDropMany<()>, | ||
| _drop_helper: AbortOnDropMany<()>, |
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.
this is used (its drop() impl is used) so change its name
| name: String, | ||
| description: String, | ||
| data_type: DataType, | ||
| _description: String, |
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.
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
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.
Yes, very much agree with you, _ is a conservative but useful way!
| impl BuiltInWindowExpr { | ||
| /// create a new built-in window function expression | ||
| pub(super) fn new( | ||
| fun: BuiltInWindowFunction, |
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.
the fun and window_frame are used to construct the BuiltInWindowFunctionExpr (so the don't need to be also encoded on the BuildInWindowExpr
| #[structopt(short = "s", long = "batch-size", default_value = "8192")] | ||
| batch_size: usize, | ||
|
|
||
| // /// Batch size when reading CSV or Parquet files |
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.
These parameters are never read (aka they don't do anything) so removing them from the CLI seemed like a reasonable thing to do
|
Nice, clippy passed😄 |
| // 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); |
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 again @xudong963. |
…#1395) * Add boolean field to Filter's proto, set based on Comet native scan implementation. Planner uses that field to construct the correct FilterExec implementation. CometFilterExec does a deep copy of the batch due to logic in Comet Scan, while DF FilterExec can do a shallow copy because native Scans do not reuse batch buffers. * Refactor to reduce duplicate code. * Fix native test. * Address nit.

Which issue does this PR close?
Related: https://blog.rust-lang.org/2021/12/02/Rust-1.57.0.html
Rationale for this change
What changes are included in this PR?
Are there any user-facing changes?