Description
Subtracting a known-empty relation cannot remove any row. Because EXCEPT
has set semantics, the result is equivalent to the distinct rows from
rift_a.
Expected: remove the empty right-hand input and generate a plan equivalent to
SELECT DISTINCT id FROM rift_a.
Actual: the generated plan retains the set-difference processing and access
to rift_empty.
How to repeat
CREATE TABLE rift_empty (id INTEGER);
EXPLAIN ('SELECT id FROM rift_a EXCEPT SELECT id FROM rift_empty');
EXPLAIN ('SELECT DISTINCT id FROM rift_a');
Version
Virtuoso Open Source Server 07.20.3240; Virtuoso ODBC Driver 07.20.3243;
Windows x64 client; WSL2 Docker server.
Description
Subtracting a known-empty relation cannot remove any row. Because
EXCEPThas set semantics, the result is equivalent to the distinct rows from
rift_a.Expected: remove the empty right-hand input and generate a plan equivalent to
SELECT DISTINCT id FROM rift_a.Actual: the generated plan retains the set-difference processing and access
to
rift_empty.How to repeat
Version
Virtuoso Open Source Server 07.20.3240; Virtuoso ODBC Driver 07.20.3243;
Windows x64 client; WSL2 Docker server.