The rule InlineSubplanInputForNestedTupleSourceRule is to remove SubplanOperators containing DataScan, InnerJoin, LeftOuterJoin, UnionAll or Distinct. Given a qualified Subplan operator called S1, Let's call its input operator O1.
===General Cases===
We have the following rewritings for general cases:
R1. Replace all NestedTupleSourceOperators in S1 with deep-copies the query plan rooted at O1;
...
This is an abstract example for this rulethe rewriting mechanism described above:
Before rewriting:
--Op1
--Subplan{
...