Javadoc
DERBY-649: Handle pushing predicates into UnionNodes. It is possible to push
single table predicates that are binaryOperations or inListOperations.
Predicates of the form or
IN are currently handled. Since these predicates would allow
optimizer to pick available indices, pushing them provides maximum benifit.
It should be possible to expand this logic to cover more cases. Even pushing
expressions (like a+b = 10) into SELECTs would improve performance, even if
they don't allow use of index. It would mean evaluating expressions closer to
data and hence could avoid sorting or other overheads that UNION may require.
Note that the predicates are not removed after pushing. This is to ensure if
pushing is not possible or only partially feasible.