Search in sources :

Example 1 with StringBasedRegexpSplitFunction

use of org.apache.phoenix.expression.function.StringBasedRegexpSplitFunction in project phoenix by apache.

the class RegexpSplitParseNode method create.

@Override
public Expression create(List<Expression> children, StatementContext context) throws SQLException {
    QueryServices services = context.getConnection().getQueryServices();
    boolean useByteBasedRegex = services.getProps().getBoolean(QueryServices.USE_BYTE_BASED_REGEX_ATTRIB, QueryServicesOptions.DEFAULT_USE_BYTE_BASED_REGEX);
    if (useByteBasedRegex) {
        return new ByteBasedRegexpSplitFunction(children);
    } else {
        return new StringBasedRegexpSplitFunction(children);
    }
}
Also used : QueryServices(org.apache.phoenix.query.QueryServices) StringBasedRegexpSplitFunction(org.apache.phoenix.expression.function.StringBasedRegexpSplitFunction) ByteBasedRegexpSplitFunction(org.apache.phoenix.expression.function.ByteBasedRegexpSplitFunction)

Aggregations

ByteBasedRegexpSplitFunction (org.apache.phoenix.expression.function.ByteBasedRegexpSplitFunction)1 StringBasedRegexpSplitFunction (org.apache.phoenix.expression.function.StringBasedRegexpSplitFunction)1 QueryServices (org.apache.phoenix.query.QueryServices)1