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

The following examples show how to use org.apache.calcite.sql.fun.SqlCaseOperator. These examples are extracted from open source projects. 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 Project: kylin-on-parquet-v2   Source File: OLAPProjectRel.java    License: 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 Project: kylin   Source File: OLAPProjectRel.java    License: 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);
    }
}