Skip to content

Commit

Permalink
Explicitly assert the datatype
Browse files Browse the repository at this point in the history
  • Loading branch information
viirya committed Oct 29, 2023
1 parent b78539e commit 0a90c0a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions datafusion/common/src/scalar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3899,10 +3899,11 @@ mod tests {
let non_null_list_scalar = ScalarValue::try_from_array(&list, 0).unwrap();
let null_list_scalar = ScalarValue::try_from_array(&list, 1).unwrap();

assert_eq!(
non_null_list_scalar.data_type(),
null_list_scalar.data_type()
);
let data_type =
DataType::List(Arc::new(Field::new("item", DataType::Int32, true)));

assert_eq!(non_null_list_scalar.data_type(), data_type.clone());
assert_eq!(null_list_scalar.data_type(), data_type);
}

#[test]
Expand Down

0 comments on commit 0a90c0a

Please sign in to comment.