Skip to content

Commit c4f0375

Browse files
authored
Set a lower threshold for clippy to flag large error variants (#17109)
1 parent c7d5904 commit c4f0375

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

clippy.toml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,14 @@ disallowed-types = [
99

1010
# Lowering the threshold to help prevent stack overflows (default is 16384)
1111
# See: https://rust-lang.github.io/rust-clippy/master/index.html#/large_futures
12-
future-size-threshold = 10000
12+
future-size-threshold = 10000
13+
14+
# Be more aware of large error variants which can impact the "happy path" due
15+
# to large stack footprint when considering async state machines (default is 128).
16+
#
17+
# Value of 70 picked arbitrarily as something less than 100.
18+
#
19+
# See:
20+
# - https://github.com/apache/datafusion/issues/16652
21+
# - https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err
22+
large-error-threshold = 70

datafusion/sqllogictest/src/engines/datafusion_engine/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ pub type Result<T, E = DFSqlLogicTestError> = std::result::Result<T, E>;
2828
pub enum DFSqlLogicTestError {
2929
/// Error from sqllogictest-rs
3030
#[error("SqlLogicTest error(from sqllogictest-rs crate): {0}")]
31-
SqlLogicTest(#[from] TestError),
31+
SqlLogicTest(#[from] Box<TestError>),
3232
/// Error from datafusion
3333
#[error("DataFusion error: {}", .0.strip_backtrace())]
3434
DataFusion(#[from] DataFusionError),

0 commit comments

Comments
 (0)