fix: wrong hash calculation of plan subtree
- We didn't traverse output during subtree traversal when calculating hash. Some nodes (Motion, Projection) store non-trivial information, which allows to distinguish different plans. We came across this by collision between two different queries: ``` SELECT w.n FROM t JOIN w ON t.n = w.n LIMIT 3 SELECT id, count(*) FROM t GROUP BY id HAVING id > 2 LIMIT 3 ``` These plan happened to have subtrees that match exactly except for output of projection, that we didn't traverse. - fix this by traversing subtree fully
Please register or sign in to comment