use of org.apache.phoenix.expression.function.LTrimFunction in project phoenix by apache.
the class SortOrderExpressionTest method ltrim.
@Test
public void ltrim() throws Exception {
List<Expression> args = Lists.newArrayList(getInvertedLiteral(" blah", PChar.INSTANCE));
evaluateAndAssertResult(new LTrimFunction(args), "blah");
}
use of org.apache.phoenix.expression.function.LTrimFunction in project phoenix by apache.
the class SortOrderExpressionTest method substrLtrim.
@Test
public void substrLtrim() throws Exception {
List<Expression> ltrimArgs = Lists.newArrayList(getInvertedLiteral(" blah", PChar.INSTANCE));
Expression ltrim = new LTrimFunction(ltrimArgs);
List<Expression> substrArgs = Lists.newArrayList(ltrim, getLiteral(3), getLiteral(2));
evaluateAndAssertResult(new SubstrFunction(substrArgs), "ah");
}
Aggregations