Package org.apache.calcite.rel.logical
Class LogicalWindow
- java.lang.Object
-
- org.apache.calcite.rel.AbstractRelNode
-
- org.apache.calcite.rel.SingleRel
-
- org.apache.calcite.rel.core.Window
-
- org.apache.calcite.rel.logical.LogicalWindow
-
- All Implemented Interfaces:
java.lang.Cloneable
,RelOptNode
,RelNode
public final class LogicalWindow extends Window
Sub-class ofWindow
not targeted at any particular engine or calling convention.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
LogicalWindow.WindowKey
Group specification.-
Nested classes/interfaces inherited from class org.apache.calcite.rel.core.Window
Window.Group, Window.RexWinAggCall
-
Nested classes/interfaces inherited from interface org.apache.calcite.rel.RelNode
RelNode.Context
-
-
Constructor Summary
Constructors Constructor Description LogicalWindow(RelOptCluster cluster, RelTraitSet traitSet, RelNode input, java.util.List<RexLiteral> constants, RelDataType rowType, java.util.List<Window.Group> groups)
Creates a LogicalWindow.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static void
addWindows(com.google.common.collect.Multimap<LogicalWindow.WindowKey,RexOver> windowMap, RexOver over, int inputFieldCount)
LogicalWindow
copy(RelTraitSet traitSet, java.util.List<RelNode> inputs)
Creates a copy of this relational expression, perhaps changing traits and inputs.static RelNode
create(RelOptCluster cluster, RelTraitSet traitSet, RelBuilder relBuilder, RelNode child, RexProgram program)
Creates a LogicalWindow by parsing aRexProgram
.static LogicalWindow
create(RelTraitSet traitSet, RelNode input, java.util.List<RexLiteral> constants, RelDataType rowType, java.util.List<Window.Group> groups)
Creates a LogicalWindow.private static java.util.List<RexNode>
toInputRefs(java.util.List<? extends RexNode> operands)
-
Methods inherited from class org.apache.calcite.rel.core.Window
computeSelfCost, explainTerms, getCollation, getConstants, getProjectOrdinals, isValid
-
Methods inherited from class org.apache.calcite.rel.SingleRel
childrenAccept, deriveRowType, estimateRowCount, getInput, getInputs, replaceInput
-
Methods inherited from class org.apache.calcite.rel.AbstractRelNode
accept, accept, collectVariablesSet, collectVariablesUsed, computeDigest, computeSelfCost, explain, getChildExps, getCluster, getCollationList, getConvention, getCorrelVariable, getDescription, getDigest, getExpectedInputRowType, getId, getInput, getQuery, getRelTypeName, getRows, getRowType, getTable, getTraitSet, getVariablesSet, getVariablesStopped, isDistinct, isKey, isValid, metadata, onRegister, recomputeDigest, register, sole, toString
-
-
-
-
Constructor Detail
-
LogicalWindow
public LogicalWindow(RelOptCluster cluster, RelTraitSet traitSet, RelNode input, java.util.List<RexLiteral> constants, RelDataType rowType, java.util.List<Window.Group> groups)
Creates a LogicalWindow.Use
create(org.apache.calcite.plan.RelTraitSet, org.apache.calcite.rel.RelNode, java.util.List<org.apache.calcite.rex.RexLiteral>, org.apache.calcite.rel.type.RelDataType, java.util.List<org.apache.calcite.rel.core.Window.Group>)
unless you know what you're doing.- Parameters:
cluster
- ClustertraitSet
- Trait setinput
- Input relational expressionconstants
- List of constants that are additional inputsrowType
- Output row typegroups
- Window groups
-
-
Method Detail
-
copy
public LogicalWindow copy(RelTraitSet traitSet, java.util.List<RelNode> inputs)
Description copied from interface:RelNode
Creates a copy of this relational expression, perhaps changing traits and inputs.Sub-classes with other important attributes are encouraged to create variants of this method with more parameters.
- Specified by:
copy
in interfaceRelNode
- Overrides:
copy
in classAbstractRelNode
- Parameters:
traitSet
- Trait setinputs
- Inputs- Returns:
- Copy of this relational expression, substituting traits and inputs
-
create
public static LogicalWindow create(RelTraitSet traitSet, RelNode input, java.util.List<RexLiteral> constants, RelDataType rowType, java.util.List<Window.Group> groups)
Creates a LogicalWindow.- Parameters:
input
- Input relational expressiontraitSet
- Trait setconstants
- List of constants that are additional inputsrowType
- Output row typegroups
- Window groups
-
create
public static RelNode create(RelOptCluster cluster, RelTraitSet traitSet, RelBuilder relBuilder, RelNode child, RexProgram program)
Creates a LogicalWindow by parsing aRexProgram
.
-
toInputRefs
private static java.util.List<RexNode> toInputRefs(java.util.List<? extends RexNode> operands)
-
addWindows
private static void addWindows(com.google.common.collect.Multimap<LogicalWindow.WindowKey,RexOver> windowMap, RexOver over, int inputFieldCount)
-
-