Details
-
Task
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
Description
The function check_equality_for_exist2in() used for picking out equalities for the exists-to-in transformation only "Check if 'func' is an equality in form "inner_table.column = outer_expr"". Extend this so that it checks "inner_expr = outer_expr".
Note that there may be issues when inner_expr is a row, as for example
exists (select * from it where ((it.a, it.b), it.c) = ((ot.a, ot.b), ot.c))
=>
((ot.a, ot.b), ot.c) in (select ((it.a, it.b), it.c) from it)
is illegal because we can't select like this.
Thus for starters, perhaps limit it to scalar expressions only.
Attachments
Issue Links
- relates to
-
MDEV-22534 Trivial correlation detection/removal for IN subqueries
-
- In Review
-