A query like the following fails with an error that is not helpful: select 1 from MyEntity where 1 = (select 1 from MyEntity e limit 1) The error is a missing order by clause, but the parsing fails with “no viable alternative”. We should always parse this and rather throw a meaningful error during visitation. |