org.apache.calcite.sql.fun.SqlCaseOperator Java Examples

The following examples show how to use org.apache.calcite.sql.fun.SqlCaseOperator. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: OLAPProjectRel.java    From kylin-on-parquet-v2 with Apache License 2.0 5 votes vote down vote up
public OLAPProjectRel(RelOptCluster cluster, RelTraitSet traitSet, RelNode child, List<RexNode> exps,
        RelDataType rowType) {
    super(cluster, traitSet, child, exps, rowType);
    Preconditions.checkArgument(getConvention() == OLAPRel.CONVENTION);
    Preconditions.checkArgument(child.getConvention() == OLAPRel.CONVENTION);
    this.rewriteProjects = new ArrayList<>(exps); // make is modifiable
    this.hasJoin = false;
    this.afterJoin = false;
    this.rowType = getRowType();
    for (RexNode exp : exps) {
        caseCount += RelUtils.countOperatorCall(SqlCaseOperator.INSTANCE, exp);
    }
}
 
Example #2
Source File: OLAPProjectRel.java    From kylin with Apache License 2.0 5 votes vote down vote up
public OLAPProjectRel(RelOptCluster cluster, RelTraitSet traitSet, RelNode child, List<RexNode> exps,
        RelDataType rowType) {
    super(cluster, traitSet, child, exps, rowType);
    Preconditions.checkArgument(getConvention() == OLAPRel.CONVENTION);
    Preconditions.checkArgument(child.getConvention() == OLAPRel.CONVENTION);
    this.rewriteProjects = new ArrayList<>(exps); // make is modifiable
    this.hasJoin = false;
    this.afterJoin = false;
    this.rowType = getRowType();
    for (RexNode exp : exps) {
        caseCount += RelUtils.countOperatorCall(SqlCaseOperator.INSTANCE, exp);
    }
}