Description:
A query involving an OUTER JOIN may produce incorrect results when the join condition uses an expression of the form `= CASE ...` with a string constant, and the joined column has a KEY constraint.
When the query is partitioned using complementary predicates (`IS NULL` and `IS NOT NULL`) and combined with `UNION ALL`, the result differs from the original query.
In particular, rows containing larger floating-point values (beyond the effective precision range) do not appear in the partitioned query result, while they are present in the original query
How to repeat:
CREATE TABLE t0(c0 FLOAT);
CREATE TABLE t1(c0 FLOAT KEY);
INSERT INTO t0 VALUES (0), (0.148433678), (527808465);
INSERT INTO t1 VALUES (0), (0.148433678), (527808465);
(SELECT ta0.c0 AS ref0, ta1.c0 AS ref1 FROM t1 AS ta1 LEFT JOIN t0 AS ta0 ON ta1.c0 = (CASE WHEN 0 THEN 'x' ELSE ta0.c0 END) WHERE ta0.c0 IS NULL)
UNION ALL
(SELECT ta0.c0, ta1.c0 FROM t1 AS ta1 LEFT JOIN t0 AS ta0 ON ta1.c0 = (CASE WHEN 0 THEN 'x' ELSE ta0.c0 END) WHERE ta0.c0 IS NOT NULL);
/* returns 1 row: (0, 0) */
SELECT ta0.c0 AS ref0, ta1.c0 AS ref1 FROM t1 AS ta1 LEFT JOIN t0 AS ta0 ON ta1.c0 = (CASE WHEN 0 THEN 'x' ELSE ta0.c0 END);
/* returns 3 rows: (0, 0) (0.148434, 0.148434) (527808000, 527808000) */