Skip to content
Snippets Groups Projects
Commit 277d570e authored by Arseniy Volynets's avatar Arseniy Volynets :boy_tone5:
Browse files

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
parent 07574e00
No related branches found
No related tags found
1 merge request!521fix: wrong hash calculation of plan subtree
Pipeline #51816 passed
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment