File tree 1 file changed +4
-3
lines changed
datafusion/physical-expr/src/expressions 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,8 @@ pub struct BinaryExpr {
54
54
right : Arc < dyn PhysicalExpr > ,
55
55
/// Specifies whether an error is returned on overflow or not
56
56
fail_on_overflow : bool ,
57
- /// precompiled regexp pattern
57
+ /// Only used when evaluating literal regex expressions. Example regex expression: c1 ~ '^a'
58
+ /// It's helpful saving time of compiling literal pattern string for each execution.
58
59
precompiled_regexp : Option < regex:: Regex > ,
59
60
}
60
61
@@ -101,7 +102,7 @@ impl BinaryExpr {
101
102
& self . op
102
103
}
103
104
104
- /// precomile literal regexp pattern
105
+ /// Get pre-compiled regexp
105
106
fn precompile_regexp_pattern ( op : & Operator , lit : & Arc < dyn PhysicalExpr > ) -> Option < regex:: Regex > {
106
107
match op {
107
108
Operator :: RegexMatch |
@@ -713,7 +714,7 @@ pub fn binary(
713
714
Ok ( Arc :: new ( BinaryExpr :: new ( lhs, op, rhs) ) )
714
715
}
715
716
716
- /// copy from arrow::compute::kernels::comparison::regexp_scalar_match
717
+ /// It is used for scalar regexp matching
717
718
fn regexp_scalar_match < OffsetSize : OffsetSizeTrait > (
718
719
array : & GenericStringArray < OffsetSize > ,
719
720
regex : & regex:: Regex ,
You can’t perform that action at this time.
0 commit comments