We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1d08370 commit e5ccc0cCopy full SHA for e5ccc0c
1 file changed
src/query/expression/src/stat_evaluator.rs
@@ -121,6 +121,20 @@ impl<'a> StatEvaluator<'a> {
121
});
122
123
match res {
124
+ Ok(None) => Ok(None),
125
+ Ok(Some(res)) => {
126
+ if cfg!(debug_assertions) {
127
+ let return_type = call.return_type.remove_generics(&call.generics);
128
+ res.check_consistency_with_type(Some(&return_type))
129
+ .map_err(|msg| {
130
+ ErrorCode::Internal(format!(
131
+ "Failed to derive statistics for function {:?}: {msg}",
132
+ call.function.signature.name
133
+ ))
134
+ })?;
135
+ }
136
+ Ok(Some(res))
137
138
Err(msg) => {
139
if cfg!(debug_assertions) {
140
Err(ErrorCode::Internal(format!(
@@ -132,7 +146,6 @@ impl<'a> StatEvaluator<'a> {
146
Ok(None)
147
}
148
- Ok(res) => Ok(res),
149
150
151
0 commit comments