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.HiveSortLimitRemover |
| Modifier and Type | Method and Description |
|---|---|
protected org.apache.calcite.rex.RexNode |
apply(org.apache.calcite.rel.metadata.RelMetadataQuery mq,
org.apache.calcite.rex.RexSubQuery e,
Set<org.apache.calcite.rel.core.CorrelationId> variablesSet,
org.apache.calcite.plan.RelOptUtil.Logic logic,
org.apache.calcite.tools.RelBuilder builder,
int inputCount,
int offset,
boolean isCorrScalarAgg) |
static org.apache.calcite.plan.RelOptRule |
forFilter(HiveConf conf) |
static org.apache.calcite.plan.RelOptRule |
forProject(HiveConf conf) |
void |
onMatch(org.apache.calcite.plan.RelOptRuleCall call) |
static void |
subqueryRestriction(org.apache.calcite.rel.RelNode relNode) |
any, convert, convert, convertList, convertOperand, convertOperand, equals, equals, getOperand, getOperands, getOutConvention, getOutTrait, hashCode, matches, none, operand, operand, operand, operand, operand, operandJ, operandJ, some, toString, unorderedpublic static org.apache.calcite.plan.RelOptRule forProject(HiveConf conf)
public static org.apache.calcite.plan.RelOptRule forFilter(HiveConf conf)
public void onMatch(org.apache.calcite.plan.RelOptRuleCall call)
onMatch in class org.apache.calcite.plan.RelOptRuleprotected org.apache.calcite.rex.RexNode apply(org.apache.calcite.rel.metadata.RelMetadataQuery mq,
org.apache.calcite.rex.RexSubQuery e,
Set<org.apache.calcite.rel.core.CorrelationId> variablesSet,
org.apache.calcite.plan.RelOptUtil.Logic logic,
org.apache.calcite.tools.RelBuilder builder,
int inputCount,
int offset,
boolean isCorrScalarAgg)
public static void subqueryRestriction(org.apache.calcite.rel.RelNode relNode)
Copyright © 2022 The Apache Software Foundation. All rights reserved.