Skip to content

Commit

Permalink
add test for same type
Browse files Browse the repository at this point in the history
  • Loading branch information
universalmind303 committed Mar 5, 2024
1 parent 454ed42 commit 56cc58c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions datafusion/expr/src/type_coercion/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,14 @@ mod tests {
let coerced_data_types = data_types(&current_types, &signature);
assert!(coerced_data_types.is_err());

// make sure it works with the same type.
let signature = Signature::exact(
vec![DataType::FixedSizeList(inner.clone(), 2)],
Volatility::Stable,
);
let coerced_data_types = data_types(&current_types, &signature).unwrap();
assert_eq!(coerced_data_types, current_types);

Ok(())
}

Expand Down

0 comments on commit 56cc58c

Please sign in to comment.