Class RegexpUtil
java.lang.Object
org.apache.drill.exec.expr.fn.impl.RegexpUtil
Utilities for converting SQL
LIKE
and SIMILAR
operators
to regular expressions.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static enum
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic RegexpUtil.SqlPatternInfo
sqlToRegexLike
(String sqlPattern) Translates a SQL LIKE pattern to Java regex pattern.static RegexpUtil.SqlPatternInfo
sqlToRegexLike
(String sqlPattern, char escapeChar) Translates a SQL LIKE pattern to Java regex pattern.static RegexpUtil.SqlPatternInfo
sqlToRegexLike
(String sqlPattern, CharSequence escapeStr) Translates a SQL LIKE pattern to Java regex pattern, with optional escape string.static String
sqlToRegexSimilar
(String sqlPattern) Translates a SQL SIMILAR pattern to Java regex pattern.static String
sqlToRegexSimilar
(String sqlPattern, char escapeChar) Translates SQL SIMILAR pattern to Java regex pattern.static String
sqlToRegexSimilar
(String sqlPattern, CharSequence escapeStr) Translates a SQL SIMILAR pattern to Java regex pattern, with optional escape string.
-
Constructor Details
-
RegexpUtil
public RegexpUtil()
-
-
Method Details
-
sqlToRegexLike
Translates a SQL LIKE pattern to Java regex pattern. No escape char. -
sqlToRegexLike
Translates a SQL LIKE pattern to Java regex pattern, with optional escape string. -
sqlToRegexLike
Translates a SQL LIKE pattern to Java regex pattern. -
sqlToRegexSimilar
Translates a SQL SIMILAR pattern to Java regex pattern. No escape char. -
sqlToRegexSimilar
Translates a SQL SIMILAR pattern to Java regex pattern, with optional escape string. -
sqlToRegexSimilar
Translates SQL SIMILAR pattern to Java regex pattern.
-