Re: Optimizer (Hep) NOT scanning RelNodes of Subqqueries

2021-06-14 Thread Stamatis Zampetakis
Hi Krishnakant, Why do you need to maintain the structure of RexSubquery? Most of the systems relying on Calcide do use the SubQueryRemoveRule so I am curious why you cannot use it in your system. Best, Stamatis On Mon, Jun 14, 2021 at 10:44 AM Krishnakant Agrawal wrote: > Haisheng, No I inclu

Re: Optimizer (Hep) NOT scanning RelNodes of Subqqueries

2021-06-14 Thread Krishnakant Agrawal
Haisheng, No I included just 4-5 rules which I don't think they tinker with subqueries. I found SubQueryRemoveRule with three configs. Are there any others too? Please let us know. I don't want to include this rule because I want to maintain these structures post-optimization too. Julian, Yes I wa

Re: Optimizer (Hep) NOT scanning RelNodes of Subqqueries

2021-06-09 Thread Julian Hyde
I presume we’re talking about scalar sub-queries (e.g. sub-query in SELECT) and sub-queries with IN and EXISTS, as opposed to sub-queries in the FROM clause. The former are represented using RexSubQuery because the queries appear in scalar expressions. There are rules to expand RexSubQuery into

Re: Optimizer (Hep) NOT scanning RelNodes of Subqqueries

2021-06-09 Thread Haisheng Yuan
Did you include the subquery related rules in the HepPlanner? Haisheng On 2021/06/09 17:59:44, Krishnakant Agrawal wrote: > Hi All, > > When running a HepOptimizer on top of a RelNode which has a subquery > embedded in it, The Optimizer does not take the RelNode representing the > subquery up

Optimizer (Hep) NOT scanning RelNodes of Subqqueries

2021-06-09 Thread Krishnakant Agrawal
Hi All, When running a HepOptimizer on top of a RelNode which has a subquery embedded in it, The Optimizer does not take the RelNode representing the subquery up for optimization. Is this by design, what's the correct way for the Subquery RelNode to be picked up for Optimization? If this is a b