mirror of
https://github.com/nushell/nushell
synced 2024-12-27 05:23:11 +00:00
equal comparisson series string (#4823)
This commit is contained in:
parent
5fcc670860
commit
005301647a
1 changed files with 4 additions and 0 deletions
|
@ -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(),
|
||||
|
|
Loading…
Reference in a new issue