new OneRowRel(cluster), selectList, fieldNameList);
public RelNode convert(RelNode rel) { OneRowRel oneRow = (OneRowRel) rel; RexBuilder rexBuilder = rel.getCluster().getRexBuilder(); return new EnumerableValuesRel( oneRow.getCluster(), oneRow.getRowType(), Collections.singletonList( Collections.singletonList( rexBuilder.makeExactLiteral(BigDecimal.ZERO))), oneRow.getTraitSet().replace(EnumerableConvention.INSTANCE)); } }
@Override public void onMatch(RelOptRuleCall call) { final OneRowRel rel = call.rel(0); call.transformTo( new ValuesRel( rel.getCluster(), rel.getRowType(), Collections.singletonList( Collections.singletonList( rel.getCluster().getRexBuilder().makeExactLiteral( BigDecimal.ZERO))))); }
? new OneRowRel(cluster) : tmpBb.root; unionRels.add(
final RelNode childRel = RelOptUtil.createProject( (null != bb.root) ? bb.root : new OneRowRel(cluster), Collections.singletonList(bb.convertExpression(node)), Collections.singletonList(validator.deriveAlias(node, 0)),
new OneRowRel(cluster), selectList, fieldNameList);
new OneRowRel(cluster), selectList, fieldNameList);
? new OneRowRel(cluster) : tmpBb.root; unionRels.add(
? new OneRowRel(cluster) : tmpBb.root; unionRels.add(
final RelNode childRel = CalcRel.createProject( (null != bb.root) ? bb.root : new OneRowRel(cluster), Collections.singletonList(bb.convertExpression(call)), Collections.singletonList(validator.deriveAlias(call, 0)),
final RelNode childRel = CalcRel.createProject( (null != bb.root) ? bb.root : new OneRowRel(cluster), Collections.singletonList(bb.convertExpression(node)), Collections.singletonList(validator.deriveAlias(node, 0)),