equal comparisson series string (#4823)

This commit is contained in:
Fernando Herrera 2022-03-12 13:15:30 +00:00 committed by GitHub
parent 5fcc670860
commit 005301647a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -266,6 +266,10 @@ pub(super) fn compute_series_single_value(
Value::Float { val, .. } => {
compare_series_decimal(&lhs, *val, ChunkedArray::equal, lhs_span)
}
Value::String { val, .. } => {
let equal_pattern = format!("^{}$", val);
contains_series_pat(&lhs, &equal_pattern, lhs_span)
}
_ => Err(ShellError::OperatorMismatch {
op_span: operator.span,
lhs_ty: left.get_type(),