Open
Description
SET CLUSTER SETTING sql.stats.automatic_collection.enabled = false;
CREATE TABLE kv (k INT PRIMARY KEY, v INT);
EXPLAIN SELECT * FROM kv AS t1, kv AS t2 WHERE t1.k = t2.k + 1;
I'm surprised that in the hash join only the left equality columns marked as a key - t2.k
is a key, so simple expressions like t2.k + 1
preserve that property (perhaps modulo overflow?). We should propagate it if possible.
The same thing for ordering:
EXPLAIN SELECT * FROM kv AS t1 INNER MERGE JOIN kv AS t2 ON t1.k = t2.k + 1;
we shouldn't need to sort the right input to the merge join.
Jira issue: CRDB-45619
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Backlog