@@ -36,15 +36,15 @@ pub enum Operator {
3636 Plus ,
3737 /// Subtraction
3838 Minus ,
39- /// Multiplication operator, like `*`
39+ /// Multiplication
4040 Multiply ,
41- /// Division operator, like `/`
41+ /// Division
4242 Divide ,
43- /// Remainder operator, like `%`
43+ /// Remainder
4444 Modulo ,
45- /// Logical AND, like `&&`
45+ /// Logical AND
4646 And ,
47- /// Logical OR, like `||`
47+ /// Logical OR
4848 Or ,
4949 /// `IS DISTINCT FROM` (see [`distinct`])
5050 ///
@@ -80,20 +80,20 @@ pub enum Operator {
8080 BitwiseShiftRight ,
8181 /// Bitwise left, like `<<`
8282 BitwiseShiftLeft ,
83- /// String concat
83+ /// String concatenation, like `||`
8484 StringConcat ,
8585 /// At arrow, like `@>`.
8686 ///
8787 /// Currently only supported to be used with lists:
8888 /// ```sql
89- /// select [1,3] <@ [1,2 ,3]
89+ /// select [1,2, 3] @> [1,3]
9090 /// ```
9191 AtArrow ,
9292 /// Arrow at, like `<@`.
9393 ///
9494 /// Currently only supported to be used with lists:
9595 /// ```sql
96- /// select [1,2, 3] @> [1,3]
96+ /// select [1,3] <@ [1,2 ,3]
9797 /// ```
9898 ArrowAt ,
9999 /// Arrow, like `->`.
@@ -120,7 +120,7 @@ pub enum Operator {
120120 ///
121121 /// Not implemented in DataFusion yet.
122122 IntegerDivide ,
123- /// Hash Minis , like `#-`
123+ /// Hash Minus , like `#-`
124124 ///
125125 /// Not implemented in DataFusion yet.
126126 HashMinus ,
@@ -163,17 +163,17 @@ impl Operator {
163163 Operator :: ILikeMatch => Some ( Operator :: NotILikeMatch ) ,
164164 Operator :: NotLikeMatch => Some ( Operator :: LikeMatch ) ,
165165 Operator :: NotILikeMatch => Some ( Operator :: ILikeMatch ) ,
166+ Operator :: RegexMatch => Some ( Operator :: RegexNotMatch ) ,
167+ Operator :: RegexIMatch => Some ( Operator :: RegexNotIMatch ) ,
168+ Operator :: RegexNotMatch => Some ( Operator :: RegexMatch ) ,
169+ Operator :: RegexNotIMatch => Some ( Operator :: RegexIMatch ) ,
166170 Operator :: Plus
167171 | Operator :: Minus
168172 | Operator :: Multiply
169173 | Operator :: Divide
170174 | Operator :: Modulo
171175 | Operator :: And
172176 | Operator :: Or
173- | Operator :: RegexMatch
174- | Operator :: RegexIMatch
175- | Operator :: RegexNotMatch
176- | Operator :: RegexNotIMatch
177177 | Operator :: BitwiseAnd
178178 | Operator :: BitwiseOr
179179 | Operator :: BitwiseXor
@@ -377,17 +377,16 @@ impl Operator {
377377 | Operator :: Question
378378 | Operator :: QuestionAnd
379379 | Operator :: QuestionPipe
380- | Operator :: Colon => true ,
380+ | Operator :: Colon
381+ | Operator :: StringConcat => true ,
381382
382383 // E.g. `TRUE OR NULL` is `TRUE`
383384 Operator :: Or
384385 // E.g. `FALSE AND NULL` is `FALSE`
385386 | Operator :: And
386387 // IS DISTINCT FROM and IS NOT DISTINCT FROM always return a TRUE/FALSE value, never NULL
387388 | Operator :: IsDistinctFrom
388- | Operator :: IsNotDistinctFrom
389- // DataFusion string concatenation operator treats NULL as an empty string
390- | Operator :: StringConcat => false ,
389+ | Operator :: IsNotDistinctFrom => false ,
391390 }
392391 }
393392
0 commit comments