Skip to content

Commit 33cf7ab

Browse files
committed
add assert
Signed-off-by: yaommen <myanstu@163.com>
1 parent 8866d95 commit 33cf7ab

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

datafusion/expr/src/type_coercion/functions.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1243,6 +1243,7 @@ mod tests {
12431243
);
12441244

12451245
let err = fields_with_udf(&current_fields, &MockUdf(signature)).unwrap_err();
1246+
assert!(matches!(err, DataFusionError::Plan(_)));
12461247
let err = err.to_string();
12471248

12481249
assert!(err.starts_with(
@@ -1261,6 +1262,7 @@ mod tests {
12611262
);
12621263

12631264
let err = fields_with_udf(&current_fields, &MockUdf(signature)).unwrap_err();
1265+
assert!(matches!(err, DataFusionError::Plan(_)));
12641266
let err = err.to_string();
12651267

12661268
assert!(err.starts_with(
@@ -1293,6 +1295,7 @@ mod tests {
12931295

12941296
let err =
12951297
fields_with_udf(&current_fields, &AlwaysExecErrUdf(signature)).unwrap_err();
1298+
assert!(matches!(err, DataFusionError::Execution(_)));
12961299

12971300
assert!(err.to_string().starts_with(
12981301
"Execution error: Function 'test' user-defined coercion failed with: Execution error: boom"

0 commit comments

Comments
 (0)