datafusion icon indicating copy to clipboard operation
datafusion copied to clipboard

Is pre-compile pattern string in regexp_match operation

Open zhuliquan opened this issue 2 months ago • 3 comments

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

zhuliquan avatar Jun 27 '24 16:06 zhuliquan