Skip to content
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

chore: fix some clippy errors & add clippy.toml #658

Merged
merged 2 commits into from
Feb 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,7 @@ check-license:
cd $(DIR); sh scripts/check-license.sh

clippy:
cd $(DIR); cargo clippy --all-targets --all-features --workspace -- -D warnings \
-A clippy::result_large_err -A clippy::box_default -A clippy::extra-unused-lifetimes \
-A clippy::only-used-in-recursion
cd $(DIR); cargo clippy --all-targets --all-features --workspace -- -D warnings

# test with address sanitizer
asan-test:
Expand Down
4 changes: 2 additions & 2 deletions analytic_engine/src/sst/parquet/meta_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -388,10 +388,10 @@ mod tests {
let parquet_filter = ParquetFilter {
row_group_filters: vec![
RowGroupFilter {
column_filters: vec![None, Some(Box::new(Xor8Filter::default()))],
column_filters: vec![None, Some(Box::<Xor8Filter>::default() as _)],
},
RowGroupFilter {
column_filters: vec![Some(Box::new(Xor8Filter::default())), None],
column_filters: vec![Some(Box::<Xor8Filter>::default() as _), None],
},
],
};
Expand Down
1 change: 1 addition & 0 deletions clippy.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
large-error-threshold = 1024
1 change: 1 addition & 0 deletions query_engine/src/logical_optimizer/type_conversion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ use log::debug;
pub struct TypeConversion;

impl OptimizerRule for TypeConversion {
#[allow(clippy::only_used_in_recursion)]
fn try_optimize(
&self,
plan: &LogicalPlan,
Expand Down
2 changes: 1 addition & 1 deletion sql/src/planner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,7 @@ fn parse_column(col: &ColumnDef) -> Result<ColumnSchema> {
}

// Ensure default value option of columns are valid.
fn ensure_column_default_value_valid<'a, P: MetaProvider>(
fn ensure_column_default_value_valid<P: MetaProvider>(
columns: &[ColumnSchema],
meta_provider: &ContextProviderAdapter<'_, P>,
) -> Result<()> {
Expand Down