Add ends-with operator and fix dataframe operator behavior (#5395)

* add ends-with operator

* escape needles in dataframe operator regex patterns
This commit is contained in:
panicbit
2022-05-02 10:02:38 +02:00
committed by GitHub
parent 07a7bb14bf
commit 49cbc30974
8 changed files with 68 additions and 2 deletions

View File

@ -35,6 +35,7 @@ impl Expression {
Operator::NotRegexMatch
| Operator::RegexMatch
| Operator::StartsWith
| Operator::EndsWith
| Operator::LessThan
| Operator::LessThanOrEqual
| Operator::GreaterThan

View File

@ -24,6 +24,7 @@ pub enum Operator {
Or,
Pow,
StartsWith,
EndsWith,
}
impl Display for Operator {
@ -48,6 +49,7 @@ impl Display for Operator {
Operator::LessThanOrEqual => write!(f, "<="),
Operator::GreaterThanOrEqual => write!(f, ">="),
Operator::StartsWith => write!(f, "starts-with"),
Operator::EndsWith => write!(f, "ends-with"),
}
}
}