rhs = LiteralExpression.newConstant(rhsLiteral, PDataType.CHAR, rhs.isDeterministic());
return new ComparisonExpression(op, Arrays.asList(lhs,rhs));
}
}
}
Expression expression = new LikeExpression(children);
if (ExpressionUtil.isConstant(expression)) {
ImmutableBytesWritable ptr = context.getTempPtr();
if (!expression.evaluate(null, ptr)) {
return LiteralExpression.newConstant(null, expression.isDeterministic());
} else {
return LiteralExpression.newConstant(Boolean.TRUE.equals(PDataType.BOOLEAN.toObject(ptr)) ^ node.isNegate(), expression.isDeterministic());
}
}
if (node.isNegate()) {
expression = new NotExpression(expression);
}