public class HiveSubQueryRemoveRule
extends org.apache.calcite.plan.RelOptRule
Sub-queries are represented by RexSubQuery
expressions.
A sub-query may or may not be correlated. If a sub-query is correlated,
the wrapped RelNode
will contain a RexCorrelVariable
before
the rewrite, and the product of the rewrite will be a Correlate
.
The Correlate can be removed using RelDecorrelator
.
Modifier and Type | Class and Description |
---|---|
static class |
HiveSubQueryRemoveRule.HiveSubQueryFinder
Visitor that throws
Util.FoundOne if
applied to an expression that contains a RexSubQuery . |
Constructor and Description |
---|
HiveSubQueryRemoveRule(HiveConf conf) |
Modifier and Type | Method and Description |
---|---|
protected org.apache.calcite.rex.RexNode |
apply(org.apache.calcite.rex.RexSubQuery e,
Set<org.apache.calcite.rel.core.CorrelationId> variablesSet,
org.apache.calcite.plan.RelOptUtil.Logic logic,
HiveSubQRemoveRelBuilder builder,
int inputCount,
int offset,
boolean isCorrScalarAgg,
boolean hasNoWindowingAndNoGby) |
void |
onMatch(org.apache.calcite.plan.RelOptRuleCall call) |
public HiveSubQueryRemoveRule(HiveConf conf)
public void onMatch(org.apache.calcite.plan.RelOptRuleCall call)
onMatch
in class org.apache.calcite.plan.RelOptRule
protected org.apache.calcite.rex.RexNode apply(org.apache.calcite.rex.RexSubQuery e, Set<org.apache.calcite.rel.core.CorrelationId> variablesSet, org.apache.calcite.plan.RelOptUtil.Logic logic, HiveSubQRemoveRelBuilder builder, int inputCount, int offset, boolean isCorrScalarAgg, boolean hasNoWindowingAndNoGby)
Copyright © 2022 The Apache Software Foundation. All rights reserved.