Description
SELECT MIN(expr) FROM ks WHERE cond;
should be transformed and pushed down as follows:
SELECT expr
FROM ks
WHERE cond AND expr IS NOT NULL
ORDER BY expr
LIMIT 1;
If the push down is not possible, then the transformation should not be done, because the MIN() is more efficient than the ORDER BY.
Attachments
For Gerrit Dashboard: MB-18875 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
62530,2 | Fix MB-18875. When possible, push SELECT MIN() down to IndexScan. | master | query | Status: MERGED | +2 | +1 |