Details
-
Task
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
None
Description
Currently these transformations only apply if the subquery is either toplevel (e.g. select ... from ... where ... in (...);, or a toplevel not (e.g. select ... from ... where not exists (...);). It may be useful to enable them for subqueries in any context (e.g. select ... from ... where (... in (...)) is null).
Before starting, it would be good to have an example query where such enhancement helps (e.g. allows materialization).
An idea of implementing this is to use transformers instead of processors, the latter used in the current implementation as exists2in_processor().
Examples of transformers:
virtual Item *neg_transformer(THD *thd) { return NULL; } |
virtual Item *update_value_transformer(THD *thd, uchar *select_arg) |
{ return this; } |
virtual Item *expr_cache_insert_transformer(THD *thd, uchar *unused) |
{ return this; } |
virtual Item *derived_field_transformer_for_having(THD *thd, uchar *arg) |
{ return this; } |
Attachments
Issue Links
- is blocked by
-
MDEV-22534 Trivial correlation detection/removal for IN subqueries
- In Review