public class TransformCorrelatedInPredicateToJoin extends Object implements Rule<ApplyNode>
Transforms:
- Apply (output: a in B.b)
- input: some plan A producing symbol a
- subquery: some plan B producing symbol b, using symbols from A
Into:
- Project (output: CASE WHEN (countmatches > 0) THEN true WHEN (countnullmatches > 0) THEN null ELSE false END)
- Aggregate (countmatches=count(*) where a, b not null; countnullmatches where a,b null but buildSideKnownNonNull is not null)
grouping by (A'.*)
- LeftJoin on (A and B correlation condition)
- AssignUniqueId (A')
- A
Rule.Context, Rule.Result| Constructor and Description |
|---|
TransformCorrelatedInPredicateToJoin() |
| Modifier and Type | Method and Description |
|---|---|
Rule.Result |
apply(ApplyNode apply,
Captures captures,
Rule.Context context) |
Pattern<ApplyNode> |
getPattern()
Returns a pattern to which plan nodes this rule applies.
|
public TransformCorrelatedInPredicateToJoin()
public Pattern<ApplyNode> getPattern()
RulegetPattern in interface Rule<ApplyNode>public Rule.Result apply(ApplyNode apply, Captures captures, Rule.Context context)
Copyright © 2012–2019. All rights reserved.