/** Equivalent to * {@link RelOptUtil#createProject(org.apache.calcite.rel.RelNode, java.util.List)} * for {@link MutableRel}. */ public static MutableRel createProject(final MutableRel child, final List<Integer> posList) { final RelDataType rowType = child.getRowType(); if (Mappings.isIdentity(posList, rowType.getFieldCount())) { return child; } return MutableProject.of( RelOptUtil.permute(child.cluster.getTypeFactory(), rowType, Mappings.bijection(posList)), child, new AbstractList<RexNode>() { public int size() { return posList.size(); } public RexNode get(int index) { final int pos = posList.get(index); return RexInputRef.of(pos, rowType); } }); }
final RelDataType newRowType = RelOptUtil.permute(join.getCluster().getTypeFactory(), join.getRowType(), mapping); final RelNode newJoin = new HiveMultiJoin(join.getCluster(),
final RelDataType newRowType = RelOptUtil.permute(join.getCluster().getTypeFactory(), join.getRowType(), mapping); final RelNode newJoin = new HiveMultiJoin(join.getCluster(),
/** Equivalent to * {@link RelOptUtil#createProject(org.apache.calcite.rel.RelNode, java.util.List)} * for {@link MutableRel}. */ public static MutableRel createProject(final MutableRel child, final List<Integer> posList) { final RelDataType rowType = child.rowType; if (Mappings.isIdentity(posList, rowType.getFieldCount())) { return child; } return MutableProject.of( RelOptUtil.permute(child.cluster.getTypeFactory(), rowType, Mappings.bijection(posList)), child, new AbstractList<RexNode>() { public int size() { return posList.size(); } public RexNode get(int index) { final int pos = posList.get(index); return RexInputRef.of(pos, rowType); } }); }
/** Equivalent to * {@link RelOptUtil#createProject(org.apache.calcite.rel.RelNode, java.util.List)} * for {@link MutableRel}. */ public static MutableRel createProject(final MutableRel child, final List<Integer> posList) { final RelDataType rowType = child.rowType; if (Mappings.isIdentity(posList, rowType.getFieldCount())) { return child; } return MutableProject.of( RelOptUtil.permute(child.cluster.getTypeFactory(), rowType, Mappings.bijection(posList)), child, new AbstractList<RexNode>() { public int size() { return posList.size(); } public RexNode get(int index) { final int pos = posList.get(index); return RexInputRef.of(pos, rowType); } }); }
RelOptUtil.permute(values.getCluster().getTypeFactory(), rowType, mapping); final LogicalValues newValues =
RelOptUtil.permute(values.getCluster().getTypeFactory(), rowType, mapping); final LogicalValues newValues =
RelOptUtil.permute(project.getCluster().getTypeFactory(), rowType, mapping);
RelOptUtil.permute(project.getCluster().getTypeFactory(), rowType, mapping);
final RelDataType newRowType = RelOptUtil.permute(window.getCluster().getTypeFactory(), rowType, permutationMapping);