fix: merge tuple transformation didn't group cols
Summarize the changes
- fix: incorrect equality cols for Eq
- In case we have equality between columns
of the same table,
eq_cols_from_eq
should return empty equality cols, but it returned None, which led to wrong motion. Fixed that. - It was found after a merge tuples transform fix, in front_sql_join_single_left_5 test where now there are two equalities instead of one. Earlier, there always was one equality because merge tuples produced a single (..) = (..) term for an and-chain. And this test didn't work, because this term contained one equality pair. Now there are two terms: (..) = (..) and (..)=(..) and one of them does not contain any equality pairs.
- fix: merge tuple transformation didn't group cols
- merge tuple transformation that merges several and-ed equalities into equlities of rows didn't group columns by child they refer to. This led to rows where we couldn't find sharding keys, because they were scattered across the different rows:
sk(t1) = (a, b), sk(t2) = (e, f)
... on (t1.a, t2.f) = (t2.e, t1.b)
But now correct rows are generated:
... on (t1.a, t1.b) = (t2.e, t2.f)
Ensure that
-
New code is covered by unit and integration tests. -
Related issues would be automatically closed with gitlab's closing pattern ( Closes #issue_number
). -
Public modules are documented (check the rendered version withcargo doc --open
). -
(if PEST grammar has changed) EBNF grammar reflects these changes (check the result with railroad diagram generator.
closes #539 (closed)
Next steps
- Cherry-pick to: none
- Update sbroad submodule in picodata/picodata.
- (if EBNF grammar has changed) create a follow-up issue in picodata/docs.