Query engine: support for 'exists' and 'not exists' operators