public class RelOptUtils extends Object
RelOptUtils
defines static utility methods for use in optimizing
RelNode
s.
This is an extension of RelOptUtil
.
Constructor and Description |
---|
RelOptUtils() |
Modifier and Type | Method and Description |
---|---|
static org.apache.calcite.rel.RelNode |
createCastRel(org.apache.calcite.rel.RelNode rel,
org.apache.calcite.rel.type.RelDataType castRowType)
Creates a projection which casts a rel's output to a desired row type.
|
public static org.apache.calcite.rel.RelNode createCastRel(org.apache.calcite.rel.RelNode rel, org.apache.calcite.rel.type.RelDataType castRowType)
This method is inspired by RelOptUtil.createCastRel(org.apache.calcite.rel.RelNode, org.apache.calcite.rel.type.RelDataType, boolean)
, different with that,
we do not generate another Project
if the rel
is already a Project
.
rel
- Producer of rows to be convertedcastRowType
- Row type after castCopyright © 2014–2020 The Apache Software Foundation. All rights reserved.