|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eigenbase.relopt.RelOptRule
net.sf.farrago.fennel.rel.FennelWindowRule
public abstract class FennelWindowRule
FennelWindowRule is a rule for implementing a CalcRel which contains
windowed aggregates via a FennelWindowRel.
There are several instances of the rule (CalcOnWinOnCalc, CalcOnWin, WinOnCalc, Win), which pull in any CalcRel objects above or below. (It may be better to write a rule which
merges CalcRel and WindowedAggregateRel objects together,
thereby dealing with this problem at the logical level.)
| Field Summary | |
|---|---|
static FennelWindowRule |
CalcOnWin
Instance of the rule which matches a CalcRel on top of a WindowedAggregateRel. |
static FennelWindowRule |
CalcOnWinOnCalc
Instance of the rule which matches CalcRel on top of WindowedAggregateRel on top of CalcRel. |
static FennelWindowRule |
Win
Instance of the rule which matches a WindowedAggregateRel on top
of a RelNode. |
static FennelWindowRule |
WinOnCalc
Instance of the rule which matches a WindowedAggregateRel on top
of a CalcRel. |
| Fields inherited from class org.eigenbase.relopt.RelOptRule |
|---|
ANY, description, operands |
| Constructor Summary | |
|---|---|
private |
FennelWindowRule(RelOptRuleOperand operand,
String description)
Creates a FennelWindowRule. |
| Method Summary | |
|---|---|
private FennelWindowRel.RexWinAggCall |
addWindows(List<FennelWindowRel.Window> windowList,
RexOver over,
RexProgramBuilder programBuilder)
|
protected void |
createRels(RelOptRuleCall call,
CalcRel outCalc,
WindowedAggregateRel winAggRel,
CalcRel inCalc,
RelNode child)
|
CallingConvention |
getOutConvention()
Returns the calling convention of the result of firing this rule, null if not known. |
private Integer[] |
getProjectOrdinals(RexProgramBuilder programBuilder,
RexNode[] exprs)
Converts a list of expressions into a list of ordinals that these expressions are projected from a RexProgramBuilder. |
private boolean |
isPartitioningOnCalcField(CalcRel inCalc,
List<FennelWindowRel.Window> windowList)
Returns whether any of the partitions in windowList uses a
field calculated in inCalc. |
private FennelWindowRel.Window |
lookupWindow(List<FennelWindowRel.Window> windowList,
boolean physical,
SqlNode lowerBound,
SqlNode upperBound,
Integer[] orderKeys)
|
| Methods inherited from class org.eigenbase.relopt.RelOptRule |
|---|
convert, equals, equals, getOperand, getOperands, getOutTrait, hashCode, matches, mergeTraitsAndConvert, mergeTraitsAndConvert, onMatch, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final FennelWindowRule CalcOnWinOnCalc
CalcRel on top of WindowedAggregateRel on top of CalcRel.
public static final FennelWindowRule CalcOnWin
CalcRel on top of a WindowedAggregateRel.
public static final FennelWindowRule WinOnCalc
WindowedAggregateRel on top
of a CalcRel.
public static final FennelWindowRule Win
WindowedAggregateRel on top
of a RelNode.
| Constructor Detail |
|---|
private FennelWindowRule(RelOptRuleOperand operand,
String description)
operand - root operand, must not be nulldescription - Description, or null to guess description| Method Detail |
|---|
public CallingConvention getOutConvention()
RelOptRule
getOutConvention in class RelOptRule
protected void createRels(RelOptRuleCall call,
CalcRel outCalc,
WindowedAggregateRel winAggRel,
CalcRel inCalc,
RelNode child)
private boolean isPartitioningOnCalcField(CalcRel inCalc,
List<FennelWindowRel.Window> windowList)
windowList uses a
field calculated in inCalc.
inCalc - Calculator relational expressionwindowList - List of windows
private FennelWindowRel.RexWinAggCall addWindows(List<FennelWindowRel.Window> windowList,
RexOver over,
RexProgramBuilder programBuilder)
private Integer[] getProjectOrdinals(RexProgramBuilder programBuilder,
RexNode[] exprs)
RexProgramBuilder. If an
expression is not projected, adds it.
programBuilder - Program builderexprs - List of expressions
private FennelWindowRel.Window lookupWindow(List<FennelWindowRel.Window> windowList,
boolean physical,
SqlNode lowerBound,
SqlNode upperBound,
Integer[] orderKeys)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||