public class HiveProject extends org.apache.calcite.rel.core.Project implements HiveRelNode
org.apache.calcite.rel.core.Project.Flags
HiveRelNode.Implementor
Modifier and Type | Field and Description |
---|---|
static org.apache.calcite.rel.core.RelFactories.ProjectFactory |
DEFAULT_PROJECT_FACTORY |
CONVENTION
Constructor and Description |
---|
HiveProject(org.apache.calcite.plan.RelOptCluster cluster,
org.apache.calcite.plan.RelTraitSet traitSet,
org.apache.calcite.rel.RelNode child,
List<? extends org.apache.calcite.rex.RexNode> exps,
org.apache.calcite.rel.type.RelDataType rowType,
int flags)
Creates a HiveProject.
|
Modifier and Type | Method and Description |
---|---|
org.apache.calcite.plan.RelOptCost |
computeSelfCost(org.apache.calcite.plan.RelOptPlanner planner) |
org.apache.calcite.rel.core.Project |
copy(org.apache.calcite.plan.RelTraitSet traitSet,
org.apache.calcite.rel.RelNode input,
List<org.apache.calcite.rex.RexNode> exps,
org.apache.calcite.rel.type.RelDataType rowType) |
static HiveProject |
create(org.apache.calcite.rel.RelNode child,
List<? extends org.apache.calcite.rex.RexNode> exps,
List<String> fieldNames)
Creates a HiveProject with no sort keys.
|
static HiveProject |
create(org.apache.calcite.plan.RelOptCluster cluster,
org.apache.calcite.rel.RelNode child,
List<? extends org.apache.calcite.rex.RexNode> exps,
org.apache.calcite.rel.type.RelDataType rowType,
List<org.apache.calcite.rel.RelCollation> collationList)
Creates a HiveProject.
|
static HiveProject |
create(org.apache.calcite.plan.RelOptCluster cluster,
org.apache.calcite.rel.RelNode child,
List<? extends org.apache.calcite.rex.RexNode> exps,
org.apache.calcite.rel.type.RelDataType rowType,
org.apache.calcite.plan.RelTraitSet traitSet,
List<org.apache.calcite.rel.RelCollation> collationList)
Creates a HiveProject.
|
List<Integer> |
getVirtualCols() |
void |
implement(HiveRelNode.Implementor implementor) |
static org.apache.calcite.rel.RelNode |
projectMapping(org.apache.calcite.rel.RelNode rel,
org.apache.calcite.util.mapping.Mapping mapping,
List<String> fieldNames)
Creates a relational expression which projects the output fields of a
relational expression according to a partial mapping.
|
accept, copy, copy, explainTerms, getChildExps, getFlags, getMapping, getMapping, getNamedProjects, getPartialMapping, getPermutation, getPermutation, getProjects, isBoxed, isMapping, isValid
childrenAccept, deriveRowType, getInput, getInputs, getRows, replaceInput
accept, collectVariablesSet, collectVariablesUsed, computeDigest, explain, getCluster, getCollationList, getConvention, getCorrelVariable, getDescription, getDigest, getExpectedInputRowType, getId, getInput, getQuery, getRelTypeName, getRowType, getTable, getTraitSet, getVariablesStopped, isDistinct, isKey, metadata, onRegister, recomputeDigest, register, sole, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
accept, accept, childrenAccept, collectVariablesSet, collectVariablesUsed, copy, explain, getChildExps, getCollationList, getConvention, getCorrelVariable, getExpectedInputRowType, getInput, getInputs, getQuery, getRelTypeName, getRows, getRowType, getTable, getVariablesStopped, isDistinct, isKey, isValid, metadata, onRegister, recomputeDigest, register, replaceInput
public static final org.apache.calcite.rel.core.RelFactories.ProjectFactory DEFAULT_PROJECT_FACTORY
public HiveProject(org.apache.calcite.plan.RelOptCluster cluster, org.apache.calcite.plan.RelTraitSet traitSet, org.apache.calcite.rel.RelNode child, List<? extends org.apache.calcite.rex.RexNode> exps, org.apache.calcite.rel.type.RelDataType rowType, int flags)
cluster
- Cluster this relational expression belongs tochild
- input relational expressionexps
- List of expressions for the input columnsrowType
- output row typeflags
- values as in Project.Flags
public static HiveProject create(org.apache.calcite.rel.RelNode child, List<? extends org.apache.calcite.rex.RexNode> exps, List<String> fieldNames) throws CalciteSemanticException
child
- input relational expressionexps
- set of expressions for the input columnsfieldNames
- aliases of the expressionsCalciteSemanticException
public static HiveProject create(org.apache.calcite.plan.RelOptCluster cluster, org.apache.calcite.rel.RelNode child, List<? extends org.apache.calcite.rex.RexNode> exps, org.apache.calcite.rel.type.RelDataType rowType, List<org.apache.calcite.rel.RelCollation> collationList)
public static HiveProject create(org.apache.calcite.plan.RelOptCluster cluster, org.apache.calcite.rel.RelNode child, List<? extends org.apache.calcite.rex.RexNode> exps, org.apache.calcite.rel.type.RelDataType rowType, org.apache.calcite.plan.RelTraitSet traitSet, List<org.apache.calcite.rel.RelCollation> collationList)
public static org.apache.calcite.rel.RelNode projectMapping(org.apache.calcite.rel.RelNode rel, org.apache.calcite.util.mapping.Mapping mapping, List<String> fieldNames) throws CalciteSemanticException
A partial mapping is weaker than a permutation: every target has one source, but a source may have 0, 1 or more than one targets. Usually the result will have fewer fields than the source, unless some source fields are projected multiple times.
This method could optimize the result as #permute
does, but does
not at present.
rel
- Relational expressionmapping
- Mapping from source fields to target fields. The mapping type must
obey the constraints MappingType.isMandatorySource()
and
MappingType.isSingleSource()
, as does
MappingType.INVERSE_FUNCTION
.fieldNames
- Field names; if null, or if a particular entry is null, the name
of the permuted field is usedCalciteSemanticException
public org.apache.calcite.rel.core.Project copy(org.apache.calcite.plan.RelTraitSet traitSet, org.apache.calcite.rel.RelNode input, List<org.apache.calcite.rex.RexNode> exps, org.apache.calcite.rel.type.RelDataType rowType)
copy
in class org.apache.calcite.rel.core.Project
public org.apache.calcite.plan.RelOptCost computeSelfCost(org.apache.calcite.plan.RelOptPlanner planner)
computeSelfCost
in interface org.apache.calcite.rel.RelNode
computeSelfCost
in class org.apache.calcite.rel.core.Project
public void implement(HiveRelNode.Implementor implementor)
implement
in interface HiveRelNode
Copyright © 2017 The Apache Software Foundation. All rights reserved.