public static class SubQueryDecorrelator.SubQueryRelDecorrelator extends Object implements org.apache.calcite.util.ReflectiveVisitor
`public` is for reflection. We use ReflectiveVisitor instead of RelShuttle because RelShuttle returns RelNode.
Modifier and Type | Method and Description |
---|---|
org.apache.flink.table.planner.plan.rules.logical.SubQueryDecorrelator.Frame |
decorrelateRel(org.apache.calcite.rel.logical.LogicalAggregate rel)
Rewrites a
LogicalAggregate . |
org.apache.flink.table.planner.plan.rules.logical.SubQueryDecorrelator.Frame |
decorrelateRel(org.apache.calcite.rel.logical.LogicalCorrelate rel) |
org.apache.flink.table.planner.plan.rules.logical.SubQueryDecorrelator.Frame |
decorrelateRel(org.apache.calcite.rel.logical.LogicalFilter rel)
Rewrite LogicalFilter.
|
org.apache.flink.table.planner.plan.rules.logical.SubQueryDecorrelator.Frame |
decorrelateRel(org.apache.calcite.rel.logical.LogicalJoin rel)
Rewrite LogicalJoin.
|
org.apache.flink.table.planner.plan.rules.logical.SubQueryDecorrelator.Frame |
decorrelateRel(org.apache.calcite.rel.logical.LogicalProject rel)
Rewrite LogicalProject.
|
org.apache.flink.table.planner.plan.rules.logical.SubQueryDecorrelator.Frame |
decorrelateRel(org.apache.calcite.rel.RelNode rel)
Fallback if none of the other
decorrelateRel methods match. |
org.apache.flink.table.planner.plan.rules.logical.SubQueryDecorrelator.Frame |
decorrelateRel(org.apache.calcite.rel.core.Sort rel)
Rewrite Sort.
|
org.apache.flink.table.planner.plan.rules.logical.SubQueryDecorrelator.Frame |
decorrelateRel(org.apache.calcite.rel.core.Values rel)
Rewrites a
Values . |
public org.apache.flink.table.planner.plan.rules.logical.SubQueryDecorrelator.Frame decorrelateRel(org.apache.calcite.rel.logical.LogicalProject rel)
Rewrite logic: Pass along any correlated variables coming from the input.
rel
- the project rel to rewritepublic org.apache.flink.table.planner.plan.rules.logical.SubQueryDecorrelator.Frame decorrelateRel(org.apache.calcite.rel.logical.LogicalFilter rel)
Rewrite logic: 1. If a Filter references a correlated field in its filter condition, rewrite the Filter references only non-correlated fields, and the condition references correlated fields will be push to it's output. 2. If Filter does not reference correlated variables, simply rewrite the filter condition using new input.
rel
- the filter rel to rewritepublic org.apache.flink.table.planner.plan.rules.logical.SubQueryDecorrelator.Frame decorrelateRel(org.apache.calcite.rel.logical.LogicalAggregate rel)
LogicalAggregate
.
Rewrite logic: 1. Permute the group by keys to the front. 2. If the input of an aggregate produces correlated variables, add them to the group list. 3. Change aggCalls to reference the new project.
rel
- Aggregate to rewritepublic org.apache.flink.table.planner.plan.rules.logical.SubQueryDecorrelator.Frame decorrelateRel(org.apache.calcite.rel.logical.LogicalJoin rel)
Rewrite logic: 1. rewrite join condition. 2. map output positions and produce corVars if any.
rel
- Joinpublic org.apache.flink.table.planner.plan.rules.logical.SubQueryDecorrelator.Frame decorrelateRel(org.apache.calcite.rel.core.Sort rel)
Rewrite logic: change the collations field to reference the new input.
rel
- Sort to be rewrittenpublic org.apache.flink.table.planner.plan.rules.logical.SubQueryDecorrelator.Frame decorrelateRel(org.apache.calcite.rel.core.Values rel)
Values
.rel
- Values to be rewrittenpublic org.apache.flink.table.planner.plan.rules.logical.SubQueryDecorrelator.Frame decorrelateRel(org.apache.calcite.rel.logical.LogicalCorrelate rel)
public org.apache.flink.table.planner.plan.rules.logical.SubQueryDecorrelator.Frame decorrelateRel(org.apache.calcite.rel.RelNode rel)
decorrelateRel
methods match.Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.