Open kasiafi opened 3 years ago
This should be validated during analysis for the case of a literal escape string.
It will not fix the issue:
trino:tiny> SELECT x, 'some_string' LIKE 'abc' ESCAPE x FROM (SELECT IF(name > 'B', '#', '') FROM region) t(x);
x | _col1
---+-------
| false
| false
| false
# | false
# | false
(5 rows)
There is a check in
LikeFunctions.getEscapeCharacter(Optional<Slice> escape)
that is supposed to catch it, but it is only accessed through certain paths.