FB 2.5 introduced fixes related to COALESCE, CASE and DECODE expressions to not duplicate sub-expressions in BLR, which was slow and had some bugs. This has made with new blr_stmt_expr. But this new BLR verb turn to be very difficult to support, specially in the optimizer.
As a result of it, some bugs (
, for example) were introduced, and some expression indexes stopped to work.
An example of an expression index not working anymore: COMPUTED BY (COALESCE(N * 2, 0)).
The complete (for FB 3) solution for these problems is:
1) introduce new specialized BLR verbs for COALESCE and DECODE/CASE;
2) transform blr_stmt_expr to new nodes when parsing legacy BLR.
Solution for 2.5 still need more analysis.