public abstract class SubQueryRemoveRule extends 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 | Field and Description |
---|---|
static SubQueryRemoveRule |
FILTER |
static SubQueryRemoveRule |
JOIN |
static SubQueryRemoveRule |
PROJECT |
description, operands, relBuilderFactory
Constructor and Description |
---|
SubQueryRemoveRule(RelOptRuleOperand operand,
RelBuilderFactory relBuilderFactory,
String description)
Creates a SubQueryRemoveRule.
|
Modifier and Type | Method and Description |
---|---|
protected RexNode |
apply(RexSubQuery e,
Set<CorrelationId> variablesSet,
RelOptUtil.Logic logic,
RelBuilder builder,
int inputCount,
int offset) |
any, convert, convert, convertList, convertOperand, equals, equals, getOperand, getOperands, getOutConvention, getOutTrait, hashCode, matches, none, onMatch, operand, operand, operand, operand, operand, some, toString, unordered
public static final SubQueryRemoveRule PROJECT
public static final SubQueryRemoveRule FILTER
public static final SubQueryRemoveRule JOIN
public SubQueryRemoveRule(RelOptRuleOperand operand, RelBuilderFactory relBuilderFactory, String description)
operand
- root operand, must not be nulldescription
- Description, or null to guess descriptionrelBuilderFactory
- Builder for relational expressionsprotected RexNode apply(RexSubQuery e, Set<CorrelationId> variablesSet, RelOptUtil.Logic logic, RelBuilder builder, int inputCount, int offset)
Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.