Transform queries like:
To allow optimizations made for IN/ALL/ANY subqueries.
Conversion is possible only if:
1)real NULL is not important (top element of WHERE/ON AND/OR list, i.e. NULL
equal to FALSE)
2a)subquery has dependences in the WHERE clause and they are equalities and in is not "NOT EXISTS" (this kind of queries could be converted to semijoin)
2b)subquery has the only dependences (after bringing them out subquery become independent) in the WHERE clause and they are equalities (could be materialized)
3)the subquery is simple (has no aggregate function, GROUp BY, ORDER BY, LIMIT
HAVING and so on)
For NOT EXISTS conversion the subquery should be marked that its left part can't
Note: Number of equalities could be limited by already allocated space for select list for current implementation.