datafusion
datafusion copied to clipboard
Is pre-compile pattern string in regexp_match operation
Is your feature request related to a problem or challenge?
I noticed below code: https://github.com/apache/datafusion/blob/6a4a280e3cf70fe5f1a1cfe7c2de13e4c39f89bb/datafusion/physical-expr/src/expressions/binary.rs#L537-L564 This looks like every time record_batch is evaluated, it will execute the compiled pattern string and use the compiled results to match arrow-array
Describe the solution you'd like
when building binary physical expr , we can pre-compile pattern string if op is regex_match
Describe alternatives you've considered
No response
Additional context
No response