Expression optimizedEscape = null;
if (node.getEscape() != null) {
optimizedEscape = toExpression(escape, expressionTypes.get(node.getEscape()));
}
return new LikePredicate(
toExpression(value, expressionTypes.get(node.getValue())),
toExpression(pattern, expressionTypes.get(node.getPattern())),
optimizedEscape);
}