public abstract class ValuesReduceRule extends RelOptRule
LogicalValues.
Returns a simplified Values, perhaps containing zero tuples
if all rows are filtered away.
For example,
select a - b from (values (1, 2), (3, 5), (7, 11)) as t (a,
b) where a + b > 4
becomes
select x from (values (-2), (-4))
Ignores an empty Values; this is better dealt with by
PruneEmptyRules.
| Modifier and Type | Class and Description |
|---|---|
private static class |
ValuesReduceRule.MyRexShuttle
Shuttle that converts inputs to literals.
|
| Modifier and Type | Field and Description |
|---|---|
static ValuesReduceRule |
FILTER_INSTANCE
Instance of this rule that applies to the pattern
Filter(Values).
|
private static org.slf4j.Logger |
LOGGER |
static ValuesReduceRule |
PROJECT_FILTER_INSTANCE
Singleton instance of this rule that applies to the pattern
Project(Filter(Values)).
|
static ValuesReduceRule |
PROJECT_INSTANCE
Instance of this rule that applies to the pattern
Project(Values).
|
description, operands, relBuilderFactory| Constructor and Description |
|---|
ValuesReduceRule(RelOptRuleOperand operand,
RelBuilderFactory relBuilderFactory,
String desc)
Creates a ValuesReduceRule.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
apply(RelOptRuleCall call,
LogicalProject project,
LogicalFilter filter,
LogicalValues values)
Does the work.
|
any, convert, convert, convertList, convertOperand, equals, equals, getOperand, getOperands, getOutConvention, getOutTrait, hashCode, matches, none, onMatch, operand, operand, operand, operand, operand, some, toString, unorderedprivate static final org.slf4j.Logger LOGGER
public static final ValuesReduceRule FILTER_INSTANCE
public static final ValuesReduceRule PROJECT_INSTANCE
public static final ValuesReduceRule PROJECT_FILTER_INSTANCE
public ValuesReduceRule(RelOptRuleOperand operand, RelBuilderFactory relBuilderFactory, String desc)
operand - Class of rels to which this rule should applyrelBuilderFactory - Builder for relational expressionsdesc - Description, or null to guess descriptionprotected void apply(RelOptRuleCall call, LogicalProject project, LogicalFilter filter, LogicalValues values)
call - Rule callproject - Project, may be nullfilter - Filter, may be nullvalues - Values rel to be reducedCopyright © 2012–2018 The Apache Software Foundation. All rights reserved.