Re: pull-up subquery if JOIN-ON contains refs to upper-query

2025-04-05 Thread Alena Rybakina
Hi! My colleague reviewed my patch and gave feedback on how to improve it - for some queries with data types that I did not consider, pull-up is not applied, although it should. Some of them: EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF, BUFFERS OFF) SELECT 1   FROM ta  WHERE EXISTS (

Re: pull-up subquery if JOIN-ON contains refs to upper-query

2025-04-03 Thread Ilia Evdokimov
On 02.04.2025 19:39, Alena Rybakina wrote: I see that I need to add a walker that, when traversing the tree, determines whether there are conditions under which pull-up is impossible - the presence of volatility of functions and other restrictions, and leave the transformation for the var o

Re: pull-up subquery if JOIN-ON contains refs to upper-query

2025-02-11 Thread Alena Rybakina
On 10.02.2025 23:51, Ilia Evdokimov wrote: On 09.02.2025 18:14, Alena Rybakina wrote: Hi! I found another example where the transformation worked incorrectly and reconsidered the idea. As for conversion of exists_sublink_to_ANY, we need to get the flattened implicit-AND list of clauses and p

Re: pull-up subquery if JOIN-ON contains refs to upper-query

2025-02-10 Thread Ilia Evdokimov
On 09.02.2025 18:14, Alena Rybakina wrote: Hi! I found another example where the transformation worked incorrectly and reconsidered the idea. As for conversion of exists_sublink_to_ANY, we need to get the flattened implicit-AND list of clauses and pull out the chunks of the WHERE clause that

Re: pull-up subquery if JOIN-ON contains refs to upper-query

2025-02-09 Thread Alena Rybakina
Hi! I found another example where the transformation worked incorrectly and reconsidered the idea. As for conversion of exists_sublink_to_ANY, we need to get the flattened implicit-AND list of clauses and pull out the chunks of the WHERE clause that belong to the parent query, since we are cal