-
Type:
Sub-task
-
Status: Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: Table SQL / API
-
Labels:None
Here's a naive implementation:
public class RegexpMatchFunction extends ScalarFunction { // NOTE! Flink calls eval() by reflection public boolean eval(String value, String pattern) { return value != null && pattern != null && value.matches(pattern); } }
I wonder if there would be a way to optimize this to use Pattern.compile(value) and use the compiled Pattern for multiple calls (possibly different values, but same pattern).
Naming
Should regex functions be prefixed with regexp_ or regex_? See also: https://github.com/apache/flink/pull/6448#issuecomment-415972833
- relates to
-
FLINK-9990 Add regexp_extract supported in TableAPI and SQL
-
- Resolved
-
-
FLINK-9991 Add regexp_replace supported in TableAPI and SQL
-
- Resolved
-