private static class CassandraRules.CassandraFilterRule extends RelOptRule
LogicalFilter to a
CassandraFilter.| Modifier and Type | Field and Description |
|---|---|
private static CassandraRules.CassandraFilterRule |
INSTANCE |
private static com.google.common.base.Predicate<LogicalFilter> |
PREDICATE |
description, operands, relBuilderFactory| Modifier | Constructor and Description |
|---|---|
private |
CassandraFilterRule() |
| Modifier and Type | Method and Description |
|---|---|
private String |
compareFieldWithLiteral(RexNode left,
RexNode right,
List<String> fieldNames)
Check if an equality operation is comparing a primary key column with a literal.
|
RelNode |
convert(LogicalFilter filter,
CassandraTableScan scan) |
private boolean |
isEqualityOnKey(RexNode node,
List<String> fieldNames,
Set<String> partitionKeys,
List<String> clusteringKeys)
Check if the node is a supported predicate (primary key equality).
|
boolean |
matches(RelOptRuleCall call) |
void |
onMatch(RelOptRuleCall call) |
any, convert, convert, convertList, convertOperand, equals, equals, getOperand, getOperands, getOutConvention, getOutTrait, hashCode, none, operand, operand, operand, operand, operand, some, toString, unorderedprivate static final com.google.common.base.Predicate<LogicalFilter> PREDICATE
private static final CassandraRules.CassandraFilterRule INSTANCE
public boolean matches(RelOptRuleCall call)
matches in class RelOptRuleprivate boolean isEqualityOnKey(RexNode node, List<String> fieldNames, Set<String> partitionKeys, List<String> clusteringKeys)
node - Condition node to checkfieldNames - Names of all columns in the tablepartitionKeys - Names of primary key columnsclusteringKeys - Names of primary key columnsprivate String compareFieldWithLiteral(RexNode left, RexNode right, List<String> fieldNames)
left - Left operand of the equalityright - Right operand of the equalityfieldNames - Names of all columns in the tablepublic void onMatch(RelOptRuleCall call)
onMatch in class RelOptRuleConverterRulepublic RelNode convert(LogicalFilter filter, CassandraTableScan scan)
Copyright © 2012–2017 The Apache Software Foundation. All rights reserved.