-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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)] | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
| List(Option<Box<Vec<ScalarValue>>>, Box<DataType>), | ||
| /// Date stored as a signed 32bit int | ||
| Date32(Option<i32>), | ||
|
|
@@ -87,7 +87,7 @@ pub enum ScalarValue { | |
| /// Interval with DayTime unit | ||
| IntervalDayTime(Option<i64>), | ||
| /// struct of nested ScalarValue (boxed to reduce size_of(ScalarValue)) | ||
| #[allow(clippy::box_vec)] | ||
| #[allow(clippy::box_collection)] | ||
| Struct(Option<Box<Vec<ScalarValue>>>, Box<Vec<Field>>), | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -85,7 +85,7 @@ pub struct CreateExternalTable { | |
| #[derive(Debug, Clone, PartialEq)] | ||
| pub enum Statement { | ||
| /// ANSI SQL AST node | ||
| Statement(SQLStatement), | ||
| Statement(Box<SQLStatement>), | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| /// Extension: `CREATE EXTERNAL TABLE` | ||
| CreateExternalTable(CreateExternalTable), | ||
| } | ||
|
|
@@ -167,13 +167,17 @@ impl<'a> DFParser<'a> { | |
| } | ||
| _ => { | ||
| // use the native parser | ||
| Ok(Statement::Statement(self.parser.parse_statement()?)) | ||
| Ok(Statement::Statement(Box::from( | ||
| self.parser.parse_statement()?, | ||
| ))) | ||
| } | ||
| } | ||
| } | ||
| _ => { | ||
| // use the native parser | ||
| Ok(Statement::Statement(self.parser.parse_statement()?)) | ||
| Ok(Statement::Statement(Box::from( | ||
| self.parser.parse_statement()?, | ||
| ))) | ||
| } | ||
| } | ||
| } | ||
|
|
@@ -183,7 +187,7 @@ impl<'a> DFParser<'a> { | |
| if self.parser.parse_keyword(Keyword::EXTERNAL) { | ||
| self.parse_create_external_table() | ||
| } else { | ||
| Ok(Statement::Statement(self.parser.parse_create()?)) | ||
| Ok(Statement::Statement(Box::from(self.parser.parse_create()?))) | ||
| } | ||
| } | ||
|
|
||
|
|
||
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.
https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure